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

[data grid] Selection of grouped row should behave as the parent selector for child values #5995

Closed
2 tasks done
matandro opened this issue Sep 1, 2022 · 1 comment
Closed
2 tasks done
Labels
component: data grid This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@matandro
Copy link

matandro commented Sep 1, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

Currently when pressing the checkbox on a grouped row it only marks that row which is very confusing.

What I feel is a correct behavior:
When pressing the checkbox select on the group parent, it should select all children. When unselecting it should unselect all children. There is a question about the best mark and behavior when only some of the child rows are selected, I would go for not marked, same as checkbox column current behavior, to keep it consistent.

Another way to handle it:
Block selection on auto generated rows. This removed the confusion but reduces usefulness.

Workaround:
Implement a custom selection model to maintain that logic.
Point of interaction:

  1. when grouping changes: each auto generated group row should get it state set by the state of it's children
  2. when selection model changes: if a child is selected, its parent groups need to be checked. if a parent is selected it children need to be updated.

Examples 🌈

No response

Motivation 🔦

This feature is mainly to keep the behavior of checkbox selection consistent with the parent. Our clients are confused why selecting a group doesn't select its children. Is the row is collapsed you don't really see that nothing is checked unless you actively look at the counter in the button.

Order ID 💳 (optional)

47166

@matandro matandro added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Sep 1, 2022
@flaviendelangle
Copy link
Member

Duplicates #4248

We discussed the topic and we fully agree that users should be able to easily enable children selection when selecting a group.

@flaviendelangle flaviendelangle added duplicate This issue or pull request already exists component: data grid This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 2, 2022
@flaviendelangle flaviendelangle changed the title Selection of grouped row should behave as the parent selector for child values [data grid] Selection of grouped row should behave as the parent selector for child values Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants