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

[DataGrid] Fix deselection not working with isRowSelectable #15692

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MBilalShafi
Copy link
Member

@MBilalShafi MBilalShafi commented Dec 1, 2024

This fix comes with a behavioral change.

Previous Behavior: When some rows were marked as "not selectable" using isRowSelectable, the "select all" checkbox could never be checked, it's always in "indeterminate" mode even if all the "selectable" rows are checked.

Updated Behavior: "Select all" checkbox status is based on the selectable rows only. When all the selectable rows are checked, "select all" checkbox will be checked even if there are a few unselectable rows not checked.

Found similar behavior with some other libraries, examples:

  • AgGrid
  • Sync Fusion Data Grid

ToDos:

  • Add test coverage
  • Add BC to migration guide

@MBilalShafi MBilalShafi added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Selection Related to the data grid Selection feature labels Dec 1, 2024
@mui-bot
Copy link

mui-bot commented Dec 1, 2024

Deploy preview: https://deploy-preview-15692--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against b3809a9

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! feature: Selection Related to the data grid Selection feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants