-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong newIndex when in nested dom-repeat list #6
Comments
While not quite the same as what you have, I have struggled a lot when combining sortable-list with dom-repeat. I have found that dom-repeat keeps a reference to each of the sortable-items and it expects them to remain in that order. Sortable-list, of course, changes the order.
Something like this:
I probably made some mistakes there so it'll still need some fiddling, but yeah. FWIW, I use sortable-list in two places, and I gave up trying to find the 'correct' solution in my first attempt and instead dropped dom-repeat altogether and instead just managed the list of items myself, which worked fine. I consider the above technique better, though, for some reason. |
Sometimes when dragging items down, the event shows a newIndex of 0 which is the wrong index.
It comes most often when dragging the first element to the button of the same group.
The text was updated successfully, but these errors were encountered: