Alfred-Skyblue / vue-draggable-plus

Universal Drag-and-Drop Component Supporting both Vue 3 and Vue 2
https://vue-draggable-plus.pages.dev/en/
MIT License
2.71k stars 106 forks source link

How could I get the new one and the old one with onMove event? #101

Open moliyu opened 4 months ago

moliyu commented 4 months ago

onMove event didn't give the oldIndex and newIndex as the event onEnd. I want to control whether it can be sorted by myself.

Aaron-zon commented 4 months ago

after the drag and drop operation concludes, it's possible to sort the array.

moliyu commented 4 months ago

after the drag and drop operation concludes, it's possible to sort the array.

I have a nested data and I only want to sort at the same level. I could return false or true if i can compare the parentId between them.