Skip to content

[TreeView] parent/child selectionBehavior #6589

Open
@nathanforce

Description

@nathanforce

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.

image

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      📋 Waiting for Sprint

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions