phphe / vue-draggable-nested-tree

Vue2 draggable tree component
https://hetree.phphe.com/
MIT License
344 stars 62 forks source link

Find replaced node #99

Closed miso25 closed 4 years ago

miso25 commented 4 years ago

Hi, is there any way to find out the replaced node after dragend? Or find the node by its index (to find the node before the one i just dropped)?

miso25 commented 4 years ago

i just found your answer in #89

// previousSibling index = dplh.parent.children.indexOf(dplh) dplh.parent.children[index-1]

this is what i needed