react-d3-tree icon indicating copy to clipboard operation
react-d3-tree copied to clipboard

Problem with adding new childrens to node without reseting the collapse state

Open kamil-zachradnik opened this issue 1 year ago • 1 comments

Thank you for taking the time to report an issue with react-d3-tree!

Feel free to delete any questions that do not apply.

Are you reporting a bug, or opening a feature request?

Reporting a bug

What is the actual behavior/output?

I used the example from a repo of a tree, i try to add a nodes on a click. When i add a tree all the nodes are collapsed (i set initialDepth to 1 beacuse i need it). So every time i append some childrens to node with setState it all refresh.

What is the behavior/output you expect?

I expect a method or a way to add some children to a node without reseting the whole tree. Or a way so i can define which nodes are collapsed and which are not, currently as i see it's not possible to open a nodes in "data" object

Can you consistently reproduce the issue/create a reproduction case (e.g. on https://codesandbox.io)?

If needed but it's simple example.

What version of react-d3-tree are you using?

latest

kamil-zachradnik avatar Oct 29 '24 09:10 kamil-zachradnik

+1) Face this issue as well...)

Any progress with this?

Thanks in advance

m-kolomoyets avatar Nov 14 '25 08:11 m-kolomoyets