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 all children of disabled node #93

Closed
mellis481 opened this issue Mar 21, 2023 · 6 comments
Closed

Disable all children of disabled node #93

mellis481 opened this issue Mar 21, 2023 · 6 comments
Labels
wontfix This will not be worked on

Comments

@mellis481
Copy link
Collaborator

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:

  1. always correctly inform the checked status of its children.
  2. provide a convenient means for selecting/unselected children.

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:

image

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.

@stale
Copy link

stale bot commented May 20, 2023

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.

@stale stale bot added the wontfix This will not be worked on label May 20, 2023
@stale
Copy link

stale bot commented May 27, 2023

This issue was closed automatically since it was marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot closed this as completed May 27, 2023
@mellis481 mellis481 reopened this Jun 26, 2023
@stale stale bot removed the wontfix This will not be worked on label Jun 26, 2023
@mellis481 mellis481 pinned this issue Jun 26, 2023
@stale
Copy link

stale bot commented Aug 25, 2023

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.

@stale stale bot added the wontfix This will not be worked on label Aug 25, 2023
@stale
Copy link

stale bot commented Sep 2, 2023

This issue was closed automatically since it was marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot closed this as completed Sep 2, 2023
@mellis481 mellis481 reopened this Oct 19, 2023
@stale stale bot removed the wontfix This will not be worked on label Oct 19, 2023
Copy link

stale bot commented Dec 18, 2023

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.

@stale stale bot added the wontfix This will not be worked on label Dec 18, 2023
Copy link

stale bot commented Dec 26, 2023

This issue was closed automatically since it was marked as stale because it has not had recent activity. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant