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

How to change cascading behaviour? #393

Open
Shivraj97 opened this issue Jan 4, 2023 · 1 comment
Open

How to change cascading behaviour? #393

Shivraj97 opened this issue Jan 4, 2023 · 1 comment

Comments

@Shivraj97
Copy link

Shivraj97 commented Jan 4, 2023

Hi Jack, I want to implement a users dropdown. Each users have certain deals which I need to display. However the cascading behavior is not per my requirement. Clicking on the parent node selects/deselects all the child nodes which is fine and when the child node is deselected then parent node also gets deselected(if that parent have only one child). I don't want this to happen even if the parent has only one child deselecting the child should not deselect the parent because that parent has its own deals which I want to display in UI. Example: Clicking on Bala selects all its child nodes(as expected)

image

and deselecting it deselects all its child nodes(as expected)

image

but selecting/deselecting Beil should selects/deselects all its children(i.e Jairam, Laxman, etc) but should not select or deselect its parent node i.e Bala. There is one prop called noCascade which stops the cascading behavior which I can't use. I need cascading but it should be only one way i.e on children(towards downward) and not parent(towards upward).
Is there any mechanism to achieve what I want currently. Basically I don't want any half or intermediate check for a node.

image

@jakezatecky
Copy link
Owner

At the moment, the component does not support the behavior you are describing. There is an option to disable the cascading behavior from the parent level, but your desire to disable it when all children all selected/deselected is not quite supported yet.

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