Skip to content
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

onEnd event oldIndex/newIndex properties behavior changed in 1.7 -> 1.8 #1472

Closed
ekzobrain opened this issue Mar 15, 2019 · 5 comments
Closed

Comments

@ekzobrain
Copy link

ekzobrain commented Mar 15, 2019

Problem:

After updating from 1.7 to 1.8 behavior of event.oldIndex/event.newIndex changed when using draggable property to restrict sortable elements. In 1.7 index values were relative to sortable elements array only, but in 1.8 they are relative to all elements present in sortable parent, not only those ones which are actually sortable (limited with draggable property).

JSBin/JSFiddle demonstrating the problem:

@owen-m1
Copy link
Member

owen-m1 commented Mar 15, 2019

@netcitylife This was intended as many people had issues when using SortableJS with frameworks such as vuedraggable where the indexes were breaking the sorting because they did not include all elements

@ekzobrain
Copy link
Author

Ok, but then you should have released 1.8 as 2.0, because this is a backward incompatible change and our applications broke after updating...
Maybe you could add new properties like draggableOldIndex/draggableNewIndex with old behavior? As for me, their existance makes sence...

@owen-m1
Copy link
Member

owen-m1 commented Mar 15, 2019

I agree this change was ignorant on my part. I can add these properties.

@ekzobrain
Copy link
Author

That would be great! Thanks

@owen-m1
Copy link
Member

owen-m1 commented Apr 8, 2019

Added in 4ca519e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants