[Vuejs]-Liquor tree drag and drop – how to prevent drop/create a parent node from a dragged child node (Vuejs)

0👍

It is possible to modify the drag option
If the destination is at the top level, disable drag and drop
However, if only the top level is blocked, the child element cannot be moved to another parent node.
so Requires a non-‘drag-on’ condition

dnd: {
    onDragFinish(targetNode, destinationNode,postion) {
    if(destinationNode.depth == 0 && postion !='drag-on'){return false;}
      return true;
 }
}

Leave a comment