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

Show and Hide nodes #570

Open
SilvaLucas92 opened this issue Mar 6, 2025 · 3 comments
Open

Show and Hide nodes #570

SilvaLucas92 opened this issue Mar 6, 2025 · 3 comments

Comments

@SilvaLucas92
Copy link

Hi there! Thanks again for the lib!

I have a question, I'm trying to render a graph of nodes where I show and hide nodes. I followed the collpased example and it worked, but I also have no connected nodes that`s causing me a lot of troubles.
My question is can i do something similar like visible=true to show and hide? this approach got me a lot of discconected nodes.

Thanks!

@vasturiano
Copy link
Owner

@SilvaLucas92 you have

nodeVisibility={node => /* your code */}

But keep in mind this won't exclude the nodes from the force engine like in the collapsable example. It will simply make them invisible.

@SilvaLucas92
Copy link
Author

so if I want to make a visibility logic I can achieve with this? because I also want to collapse and expand

@vasturiano
Copy link
Owner

so if I want to make a visibility logic I can achieve with this? because I also want to collapse and expand

Yes, that's what it's for. It's totally independent of the mechanism in the collapsable example, which essentially removes and adds nodes to the system.

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