Reputation: 485
I'm trying to build a TreeView
from scratch in Vue. This is my code so far.
The first problem I'm encountering is that the content of the subfolders (like child folder 1
) is not being displayed. The second problem is that minimizing the subfolders minimizes the whole treeview.
Could anyone help me understand why these two errors in functionality are occurring and how to fix them?
Upvotes: 0
Views: 415
Reputation: 152
https://itnext.io/recursion-for-nested-tree-structure-components-in-vue-1cb600005475
treeData: {
name: "My Tree",
isOpen: true,
children: [
{ name: "hello" },
{ name: "wat" },
{
name: "child folder",
isOpen: false,
children: [
{
name: "child folder 1",
isOpen: false,
children: [{ name: "hello" }, { name: "wat" }]
},
{ name: "hello" },
{ name: "wat" },
{
name: "child folder 2",
isOpen: false,
children: [{ name: "hello" }, { name: "wat" }]
}
]
}
]
}
};
Upvotes: 1