[TreeView] parent/child selectionBehavior
- Dominant language
- TypeScript
- Stars
- 15.9k
- Forks
- 1.6k
- Avg merge
- 3d 9m
- Merged PRs (30d)
- 59
Description
### Provide a general summary of the feature here
I'm having a hard time implementing parent/child selection behavior in a TreeView. Specifically I'd like to be able to:
1. select a parent and all of its children by selecting the parent checkbox.
2. Unselecting a child while siblings are still selected switches the parent to indeterminate
3. Unselecting the last child unselects the parent
4. Should `onSelectionChange` include parent keys? In my case parents are basically just meant for grouping and in my external state I'm only interested in knowing which child items are selected.
### 🤔 Expected Behavior?
Support intuitive parent/child selection.
### 😯 Current Behavior
Parents and children feel unrelated
### 💁 Possible Solution
_No response_
### 🔦 Context
I'm building this sort of CheckboxTree, which I suspect is a pretty common usage of Tree.
### 💻 Examples
_No response_
### 🧢 Your Company/Team
_No response_
### 🕷 Tracking Issue
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.