phphe / vue-draggable-nested-tree

Vue2 draggable tree component
https://hetree.phphe.com/
MIT License
344 stars 62 forks source link

Disable nesting for specific tree #92

Closed ben-roth closed 5 years ago

ben-roth commented 5 years ago

I have 2 trees, I want to disable nesting in one tree so that I can't nest any children but I want to be able to keep nesting working in the other tree. Is there a way I can do this by tree? Thank you!

phphe commented 5 years ago

make the data not nested, then the tree will not be nested. If you just want the tree with nesting data looks not nested, pass tree prop indent 0

<Tree :indent="0">
ben-roth commented 5 years ago

make the data not nested

I understand that, but when dragging nodes around, they can easily "nest" even if they look like they are not nested by using indent="0" that will still nest the data no? Or will indent="0" prevent drag nesting?

phphe commented 5 years ago

set all node 'droppable=false'

ben-roth commented 5 years ago

Thanks!