You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could track down the problem. The dragTarget is (in my case) an element inside my (custom) node component. This also contains a data-path attribute, but containing the ids of that path instead of the indices. What I did to fix that is to add this code snippet to ondrop method in packages/core/src/index.ts:
exportfunctionondrop<T>(target: HTMLElement,dragTarget: HTMLElement|null|undefined,dragTargetRoot: TreeData<T>[],dropTargetRoot: TreeData<T>[],next: (dropData: DropData<T>)=>void){// this is the new check to get the correct HTMLElementwhile(dragTarget&&!dragTarget.classList.contains('tree-anchor')){dragTarget=dragTarget.parentElement}
I don't know if this only affects the drop event or also others. I also don't know if this is something that has changed with Vue3 or is related to my custom component. So I'm not sure if this is worth a PR or not.
(I also have another problem with wrong DropPosition which I have to fix first :D)
Edit:
This also affects dragTarget in ondrag method in packages/core/src/index.ts
Version(if relevant): 6.0.1 (Vue 3)
Expected:
Dropping a node onto another should return an object of type
DropData
in@drop
event handler.Actual:
Instead the "normal" drop event is returned
The text was updated successfully, but these errors were encountered: