Replies: 1 comment 6 replies
-
I tried using items with IDs and still give the same behavior: https://codepen.io/reefki/pen/MWvqbEN |
Beta Was this translation helpful? Give feedback.
6 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Watched @calebporzio accordion screencast and try to implement the same concept on my project. But there is one difference, in the screencast each item has an ID while in my case each item is just a plain text without ID.
I tried to add "Delete" item functionality which basically remove the item using its index like so:
However, no matter which button I clicked it will remove the last item from array and ignoring the index.
Here is the pen: https://codepen.io/reefki/pen/LYjJbpN
EDIT
I know I can just remove the
x-data
attribute from the item loop and it will work just fine, but in my case (which more complex than the above example) thex-data
is really needed.Beta Was this translation helpful? Give feedback.
All reactions