Vue.D3.tree icon indicating copy to clipboard operation
Vue.D3.tree copied to clipboard

CollapseAll

Open junzai97 opened this issue 4 years ago • 3 comments

How can I set the tree to be rendered with all the nodes are collapse?

junzai97 avatar Mar 30 '20 05:03 junzai97

Even I'm looking for same. Please let me know if you have found anything.

Thanks

RoshanAtDure avatar Apr 22 '20 04:04 RoshanAtDure

template

<tree
  :data="data"
  ref="tree"
>
</tree>

js

this.$refs.tree.collapseAll(this.$refs.tree.internaldata.root)

guog avatar Jun 01 '20 03:06 guog

@guog 's solution works. Thanks!

For the longest time, i was passing the json into the function instead of this.$refs.tree.internaldata.root

ghost avatar May 29 '21 20:05 ghost