Prevent node disappear after leave tree area
BossHogg97 opened this issue · 1 comments
BossHogg97 commented
Hi, i'm working with a draggable tree. I need to drag a node from tree to an other page element but when i leave the tree area the node disappear from tree.
Is there any way to prevent this behaviour?
I setted up the tree like:
<Draggable
ref="treeRef"
:keepPlaceholder="true"
:disableDrop="true"
@leave="onDragNode"
class="mtl-tree ml-2"
v-model="bomItems"
treeLine
virtualization
:indent="26"
style="height: 90vh"
>
......
</Draggable
And the leave event is:
const onDragNode= () => {
if (dragContext.dragNode.data.level === 0) {
return false
} else {
const moveNode = dragContext.dragNode.data
evtLeaveDrop.emit({ moveNode })
}
Thanks
BossHogg97 commented
I find the solution. When leave evt is triggered i have to set hidden=false