Bug: method "insertIn" doesn't care if we drop node into another node which is in leaves array in config
olsoncarsen opened this issue · 8 comments
If we want to use drag and drop while async loading and there are some nodes without children, we put their ids into the leaves array in config. If we drag and drop into the node which is in leaves array, icon will not show and node id won't be removed from leaves array.
Way to reproduce: drag node into the "text3" or "text4".
Sandbox: https://codesandbox.io/s/async-forked-qq3mii?file=/src/App.vue
Hello, i'm sorry i'm very busy right now, I will take a look as soon as I can.
It's alright
Hey I wanted to have a look but I feel that your example is not working anymore can you create a new test case please :) ?
@N00ts this should work, steps to reproduce: drag task3 into task4
Hello, what you try to do is to handle "leaves" manually. The icon does not appear because you keep the id the drop target node in config.leaves. I modifed the project and put "node-drop" after insert event so you can handle it manually in this event.
Regards
@N00ts, okay. I'm closing this issue