Description
🙋 Feature Request
When the Multiple Selection mode is activated in the TreeView component, selecting a parent node should recursively select its child nodes and reflect the children's state in the parent's checkbox.
🤔 Expected Behavior
Selecting (checking) a parent node automatically selects all its child nodes recursively.
A parent node becomes checked if all its child nodes are selected.
A parent node becomes indeterminate if only some of its child nodes are selected.
😯 Current Behavior
Currently, selecting a parent node does not automatically select its child nodes. Additionally, parent nodes do not visually reflect the selection state of their children.
💁 Possible Solution
Implement recursive selection logic:
On parent node selection, propagate the selection to all child nodes.
On selection change of a child node, update parent nodes to reflect checked or indeterminate states based on child selections.
🔦 Context
The current behavior can be confusing for users as it does not align with common UI practices for hierarchical selection. Providing recursive and reflective selections improves intuitiveness and usability.
💻 Examples
Example scenario:
✅ Parent Node (checked)
....✅ Child Node 1
....✅ Child Node 2
➖ Parent Node (indeterminate)
.... ✅ Child Node 1
.... ☐ Child Node 2