geekhybrid / vue3-tree-vue

MIT License
63 stars 22 forks source link

Disable dragging of specific nodes #32

Open SciManJD opened 1 month ago

SciManJD commented 1 month ago

Hi, I would like to disable the dragging of the specific nodes. Actually I would like to decide this at runtime. I mean, when I catch a node, I want to check some conditions and to decide if this node can be dragged. Is this possible somehow? Maybe I can do this somehow with the dropValidator, but it is not clear how.

geekhybrid commented 1 month ago

Hi, I'll have a look, I can't quite remember if a disabled node isn't draggable.

But no the dropValidator is only called when the drop has happened. I am guessing your use case will require a "beforeDragEvent" or equivalent.