x-for
ordering is incorrect when used with Fuse.js and tablesort
#2660
Unanswered
sumanthratna
asked this question in
5. Bugs
Replies: 1 comment
-
I haven't checked but, if Alpine prints values in a certain order, there's no reason why x-for would shuffle them. Are you sure that it's not tableSort bug (note that your table is still meant to be sorted by name and alpine patch one item at the time, if tableSort shuffles the rows while Alpine is midway patching, it won't work really way: ideally you would call tablesort.refresh at the end of your filter function to make sure everything goes back to the right place). |
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
-
Issue
Changing the order of DOM elements (with a method other than alpine.js) and then re-rendering with a different order using Alpine.js, the resulting order is incorrect. This is shown more clearly in the repro
Reproduction
(codesandbox/jsfiddle are bit buggy with Alpine.js data for me so I don't have a runnable link)
1,2,4,3,5,0
2,3,1,0,4,5
). search "e". Above the table we see that the search results are still1,2,4,3,5,0
. However, Alpine renders4,3,2,1,5,0
Potential Fix
div
above the table), yet the ordering of the table rows is wrong. Therefore, it feels like this is a bug that should be resolvedBeta Was this translation helpful? Give feedback.
All reactions