-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Great work!
What about if there is no children and I want to insert a node to another node, that has no children? currently it does not work at all.
... node.vue:
<draggable
@input="updateValue"
>
/**
* Workaround if there is no child yet
*/
move(value: any): void {
const parent = value.relatedContext.component.$parent;
const isNodeComponent = parent.updateChildValue;
if (!parent.hasChildren && isNodeComponent ) {
const insertedElement: TreeItem = value.draggedContext.element;
parent.updateChildValue(insertedElement);
}
}
Any better idea? =)
Metadata
Metadata
Assignees
Labels
No labels