Open flight9 opened 6 years ago
set rootnode.droppable = false
@phphe
I overwitten the dragstart
hook with following codes, but the placeHolder still appears at root level.
dragStartHook(node) {
const rootNode = node._vm.store.rootData; // guess I got rootNode correctly
this.$set(rootNode, 'droppable', false);
},
Before dragging:
While dragging:
this is a bug. rootnode can't be set droppable false now. i will try to resolve it.
@phphe thanks for confirming
latest 2.1.7 should solve that
Our project have a constraint that there should only be one node at the root level. So we use following codes to prevent that happening, it works:
But we found the placeHolder still appears at root level, that may mislead our users by let them think the root level is permitted for node to be dropped. Is there a way to prevent the placeholder appearing?
version: vue-draggable-nested-tree 2.1.6