-
Notifications
You must be signed in to change notification settings - Fork 39
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 all children of disabled node #93
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue was closed automatically since it was marked as stale because it has not had recent activity. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue was closed automatically since it was marked as stale because it has not had recent activity. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue was closed automatically since it was marked as stale because it has not had recent activity. Thank you for your contributions. |
As a maintainer, I'm logging this "feature request" because it's something my team plans on executing in the foreseeable future, but I want there to be visibility to the consumers of this library. Please provide feedback if you have any regarding this issue.
Core Principles
There are two principles for a tree component that must be upheld with regard to parent nodes to ensure good usability and accessibility. A parent node should:
Problem Statement
Being able to disable a parent node and have its children not also be disabled automatically creates situation that doesn't make any sense and creates usability and accessibility issues
Details
Currently, only nodes passed in
defaultDisabledIds
will be disabled. This means that if a parent is disabled, its children will not automatically be disabled. eg:In the example above, it doesn't make any logical sense to say "'Tea' should not be selectable, but all of its children should be."
More importantly, being able to select children of a disabled parent creates serious issues due to propagating selection to/through the disabled parent node. Currently, no selection (not even half-selection) is propagated to/through a disabled parent node when a child is selected. This causes usability and accessibility issues when the parent (or grandparent) is collapsed because a user can't tell what children are selected. If you argue "well then just propagate selection to/through the disabled parent node", that would create a situation where you could effectively select a disabled node by selecting all of its children which would be a huge issue.
For these reasons, children of a disabled parent node should be automatically disabled.
The text was updated successfully, but these errors were encountered: