Vue.D3.tree
Vue.D3.tree copied to clipboard
CollapseAll
How can I set the tree to be rendered with all the nodes are collapse?
Even I'm looking for same. Please let me know if you have found anything.
Thanks
template
<tree
:data="data"
ref="tree"
>
</tree>
js
this.$refs.tree.collapseAll(this.$refs.tree.internaldata.root)
@guog 's solution works. Thanks!
For the longest time, i was passing the json into the function instead of this.$refs.tree.internaldata.root