mfuu / vue3-virtual-drag-list

A virtual scrolling list component that can be sorted by dragging, for vue3

Home Page:https://mfuu.github.io/vue3-virtual-drag-list/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drop method triggering issue

max-min-max opened this issue · comments

drop method; Why is it executed twice when dragging is completed

commented

If the drop list is different from the start, both lists are triggered once.

drop method; Why is it executed twice when dragging is completed

You can actually check the event.oldIndex and event.newIndex.
the list from which the item is dragged will be having event.newIndex = -1, and list which the item is dragged to will have event.oldIndex =-1