Replies: 3 comments 15 replies
-
You need to use unique keys on the x-for. |
Beta Was this translation helpful? Give feedback.
8 replies
-
The sort plugin also looks broken to me (just because I can't access this.$store directly). Another approach is to have a "sort" button or up/down buttons near every element. Up/Down buttons:
Sort button:
|
Beta Was this translation helpful? Give feedback.
7 replies
-
This is solved with #4361 |
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
-
I have issue with x-for and sorting the elements.
I have an array that I want to sort using alpine x-sort plugin. Issue is that each element of the array has an x-model attribute to allow modification of that element.
Once I move element around, the array updates correctly but since the original element is moved in dom, x-model render the wrong position in the array.
I know that the issue is with using the index with x-model.
Codepen for reference: https://codepen.io/nlet/pen/qBwJJzg
Beta Was this translation helpful? Give feedback.
All reactions