phphe/he-tree-vue

Problem with targetPath at nested branches

schrodinger-cat opened this issue · 5 comments

I have strange targetPath in the store at drag event. You can see it here - https://codesandbox.io/s/hardcore-jackson-nr5xl?file=/src/App.vue

when I drop first element to second position I expect, that targetPath be [0, 1], but now it [0, 2]. in the DOM data-tree-node-path updated correctlly

phphe commented

I just published 2.0.1-1.beta.3, please try.

Sandbox cant load dependency, may be later. I cant try it right now at the normal enviroment, tommorow I will send you full feedback.

Anyway, thanks for your work.

I tested 2.0.1-1.beta.3, and it work correct. Sometimes i catch issue, when oneMoveStore is empty (it returns {}), but i really dont know that is a bug or feature :) anyway in my case it dont really needed, i watch only prepend action, to send correct type to server

thank you

phphe commented

oneMoveStore is for every move event. It is created when move start, destroied when move end. In event drag, it is destroied.

This issue returned. I'm using version 2.0.10 and when i drag element after another in same branch - index of dragged element increased by 1. When i put dragged element before another - all fine.

bug