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

Disable expand if number of nodes are higher than a specific value #413

Open
riyasat-ali opened this issue Jun 6, 2024 · 3 comments
Open

Comments

@riyasat-ali
Copy link

riyasat-ali commented Jun 6, 2024

Hey @bumbeishvili @michael-lumley
I want to disable the expand button if the number of children for that node exceeds 100. Can you tell me the solution or piece of code for that?

Thanks in advance.

@bumbeishvili
Copy link
Owner

You can utilize nodeUpdate method, check if node has more than 100 children, and if it does then hide node button

d3.select('.node-button-g').style('display','none')

@riyasat-ali
Copy link
Author

Hi @bumbeishvili
Just one more question, how can I get that number from the expand button like how many children it is having?

@riyasat-ali
Copy link
Author

Also, expandAll is expanding all the nodes.

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

2 participants