Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Kamilos1337 opened this issue Oct 29, 2024 · 0 comments

Comments

@Kamilos1337
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant