holiber/sl-vue-tree

Path of targetNode is old

betterRunner opened this issue · 2 comments

Hi there,
the path of targetNode in the callback nodeDropped is the old path instead of the one after the drop, that makes the updateNode function unable to use. How to fix this?
Thanks.

I seem to be running into this problem as well. Was this fixed? Thank you!

I use traverse() method something like this:

dropHandler([node]) {
  this.$refs.slVueTree.traverse((traverseNode) => {
    let proceed = true;
    if (node.data.id === traverseNode.data.id) {
      console.log(traverseNode);
      proceed = false;
   }
    return proceed;
  });
}

traverseNode will have refreshed state.
Before that i add unique id in nodes data field.