Closed Alex-Sokolov closed 6 years ago
Hi. You can use traverse
method to change the original model:
slVueTree.traverse((node, nodeModel, path) => {
Vue.set(nodeModel, 'isSelected', true);
})
Also you can try to use select
method
slVueTree.select(node)
However this is an undocumented method and it is going to be changed in next versions
@Alex-Sokolov you can upgrade and try select(path)
method from v1.5.0
Example:
and somewhere
selectedNode
method:When selecting node in sidebar — all ok, but if we select one node, and later somewhere change
isSelected
in nodes — will be two selected nodes.How to handle selecting nodes outside component, from data?