Using single quotes for wire:click attribute on a blade component doesn't work #100
mattkibbler
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I started a discussion here that has more detail.
In summary, when passing data to a modal the README recommends using single quotes for the
wire:clickattribute like this:...but if you use this approach for a blade component like this:
...the double quotes within the
wire:clickattribute get escaped and you end up with something like this:... which causes an error when clicking the button.
Instead, I got it working by sticking with using double quotes for the attribute and single quotes for the array within
json_encode.I thought I'd mention this here incase anybody else runs into this problem.
Beta Was this translation helpful? Give feedback.
All reactions