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] Selecting a column groups child has irregular effects on its parents #5359

Closed
2 tasks done
jim-alexander opened this issue Jun 30, 2022 · 2 comments
Closed
2 tasks done
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists feature: Selection Related to the data grid Selection feature feature: Tree data Related to the data grid Tree data feature plan: Pro Impact at least one Pro user

Comments

@jim-alexander
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Kapture 2022-06-30 at 22 18 57

I am using tree data in combination with the selectionModel. The result is that the checkbox's don't seem to have the correct state for either expanded or collapsed children.

Expected behavior 🤔

By correct I mean, if a child (expanded or not) is selected its parent should be checked (or Indeterminate if other children aren't selected)

Steps to reproduce 🕹

https://codesandbox.io/s/data-grid-pro-forked-698g17?file=/src/App.tsx

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Order ID 💳 (optional)

No response

@jim-alexander jim-alexander added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 30, 2022
@DanailH
Copy link
Member

DanailH commented Jun 30, 2022

Hi, @jim-alexander thanks for raising this! This is a valid problem. We will look into it.

@DanailH DanailH added bug 🐛 Something doesn't work feature: Selection Related to the data grid Selection feature feature: Row grouping Related to the data grid Row grouping feature component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user feature: Tree data Related to the data grid Tree data feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer feature: Row grouping Related to the data grid Row grouping feature labels Jun 30, 2022
@flaviendelangle
Copy link
Member

For me this issue is a duplicate of #4248
But yes we should have a smart parent / child selection relationship

@DanailH DanailH added the duplicate This issue or pull request already exists label Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists feature: Selection Related to the data grid Selection feature feature: Tree data Related to the data grid Tree data feature plan: Pro Impact at least one Pro user
Projects
None yet
Development

No branches or pull requests

3 participants