Open satvikpendem opened 5 years ago
import {Tree, TreeNode, DraggableTree, DraggableTreeNode} from 'vue-draggable-nested-tree' check https://github.com/phphe/vue-draggable-nested-tree#import
you may want import {Tree} from 'vue-draggable-nested-tree' or import {DraggableTree} from 'vue-draggable-nested-tree'
I used DraggableTree, it worked, thanks. I just forgot the { } even for a single import (import {DraggableTree}
instead of import DraggableTree
)
What is the difference between each of the Tree, TreeNode, DraggableTree, DraggableTreeNode?
Also, is there any way to have recursive components, so I can for example have a TaskList, composed of TaskItem components, and parent talks to children and vice versa? Similar to https://jsfiddle.net/dede89/bfksoj5b/9/ from the VueDraggable package. Because I want to modularize the code base instead of having a big template in the TaskList view.
Tree, TreeNode can't be dragged. Tree, TreeNode, DraggableTree, DraggableTreeNode are exposed for who want extend them. sorry, I can't understand the third paragraph.
If you go to the jsfiddle link, it has a draggable todo list that has recursive components, like the tree node calls itself. Is something like that possible in this library?
It may be unnecessary to use recursive components. However, the name of TreeNode and DraggableTreeNode is TreeNode
.
I'm trying to import the Tree component inside my own component, but I'm getting an error that the component is not registered properly:
My approach:
Warning:
Also, I know I need to import the Tree from DraggableTree. I tried
but it doesn't work. How do I import it like in your examples?