Closed neo1380 closed 4 years ago
I'd like to be able to specify a 'selected' property of type boolean on my nodes and get that evaluated correctly. If I replace the entire hierarchy of nodes with changes in the selected states of my nodes, I'd like the tree to reflect those changes. And an extra nice feature would be if the tree expanded all nodes to the selected nodes automatically.
@neo1380
You should use getNodeById(node.id)
.
@mimarox
The tree state is saved separately from the nodes by design. This way you can refresh the nodes state from the server and not lose UI state, persist tree state to localstorage, etc.
So you can bind to [(state)]
and achieve what you are looking for:
https://angular2-tree.readme.io/docs/save-restore
I am using angular-tree-component and i am trying to select a checkbox manually. i have used
Is there any other recommended way to select a checkbox ? Also, the above selection is happening only when i pass
node.uuid
., if i passnode.id
then it throws an error.