You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a hard time implementing parent/child selection behavior in a TreeView. Specifically I'd like to be able to:
select a parent and all of its children by selecting the parent checkbox.
Unselecting a child while siblings are still selected switches the parent to indeterminate
Unselecting the last child unselects the parent
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
The text was updated successfully, but these errors were encountered:
We'll be most likely looking to add this behavior to our implementation of RSP TreeView (and by extension RAC Tree) since it is supported by Spectrum Design, but I'm unsure when that work will be slated to be picked up. As for the implementation, I imagine SelectionManager would need to be updated to have a mode where toggling the selection of a node that has children would also select the children. As for onSelectionChange including the parent keys I imagine we would still want to include them for use cases do care about parent key selection as well but maybe that could be changed via a option as well.
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:
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
The text was updated successfully, but these errors were encountered: