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

initialDepth is not working #257

Closed
Imadra opened this issue Jan 6, 2020 · 1 comment
Closed

initialDepth is not working #257

Imadra opened this issue Jan 6, 2020 · 1 comment

Comments

@Imadra
Copy link

Imadra commented Jan 6, 2020

So, what I'm trying to do is to set initialDepth for my tree like this:
<Tree data={self.state.data} separation={self.state.separation} pathFunc="elbow" translate={self.state.translate} orientation="vertical" initialDepth={1}/>
However, my tree is not collapsing to initial depth, so I wonder why is that happening?

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

Bug

What is the actual behavior/output?

Tree is not collapsing to initial depth

What is the behavior/output you expect?

Tree has to be collapsed

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

1.16.1

@bkrem
Copy link
Owner

bkrem commented Jan 15, 2020

Hi @Imadra,

I just double checked and initialDepth hasn't regressed in terms of what it actually is supposed to do (set the depth on the first render), but I believe you're talking about the case where initialDepth is not applied when the data set changes dynamically.

There's already an issue for that case here (#47), so I'll close this as a duplicate.

I'm currently in the process of addressing the issue, so bear with me please; I should be able to finally ship a fix for this very soon :)

@bkrem bkrem closed this as completed Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants