Replies: 2 comments 11 replies
-
I think maybe you want If still not working can you make a codepen? |
Beta Was this translation helpful? Give feedback.
11 replies
-
Ah, the problem seem deeper that imagined ^^; |
Beta Was this translation helpful? Give feedback.
0 replies
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 been trying this on my own for sometime. Hope to get advice.
Basically i am using an x-for statement to dynamically generate an arbitrary number of checkboxes.
the x-for statement generates a div with a nested div containing a checkbox for each record. The checkbox will be named using a concat of the "a" prefix and the record_id.
My goal is to bind the classes attribute of the parent div (for each record attribute) so when the child checkbox is checked, it will apply the tailwind classes bg-lightBlue-700 and text-gray-50 on the parent div.
My big difficulties is trying to understand the syntax on how to nest TWO expressions$ref and $ {record.record_id} and I am not even sure if that's possible. And also, is my approach right? I also need to have unique refs generated for each div as I intend to store the checkboxes that are ticked in a JSON array which will be then sent to the server.
Thank you very much for your kind help.
Beta Was this translation helpful? Give feedback.
All reactions