mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.06k stars 1.26k forks source link

[data grid] Reverse select all behavior #7753

Open oliviertassinari opened 1 year ago

oliviertassinari commented 1 year ago

Steps to reproduce πŸ•Ή

Link to live example:

Steps:

  1. Open https://mui.com/x/react-data-grid/#mit-license-free-forever
  2. Click on the checkbox of one row
  3. Click on the checkbox of the header

Current behavior 😯

Unselect all

https://user-images.githubusercontent.com/3165635/215325205-83b1dabd-c361-4b11-a0c5-9190567ac42f.mov

Expected behavior πŸ€”

Select all

https://user-images.githubusercontent.com/3165635/215325318-c43bb670-2460-4a9e-9a54-4c896a2c694f.mov

Context πŸ”¦

You can reproduce the same behavior on:

I can't find one data grid that behaves like us cc @gerdadesign. I have found this with https://mui.zendesk.com/agent/tickets/6769. This is likely creating confusion with end-users. At least, it does for me, I didn't realize it. Subcontionously as an end-user, once you have selected on row, you would try to double click to unselect everything, but with MUI's you would get the opposite of what you want.

Your environment 🌎

v6.0.0-beta.1

Order ID πŸ’³ (optional)

No response

MBilalShafi commented 1 year ago

I agree, it's the same behavior everywhere, even the GitHub issues/PR pages have the same UX.

oliviertassinari commented 1 year ago

OK, so it's even something that the community could work on, it's on the MIT side.

oliviertassinari commented 1 year ago

This would also make us consistent with this other demo: https://mui.com/material-ui/react-checkbox/#indeterminate.

gerdadesign commented 1 year ago

Yes, agreed!

oliviertassinari commented 1 year ago

@DanailH Maybe it could be an onboarding ticket for @noraleonte to navigate a bit the codebase? The scope is finite/clear/small and it's about design execution.

DanailH commented 1 year ago

That's a good suggestion @oliviertassinari but It will be better if she focuses on the pickers mainly because she is part of their team but also because her mentor is also within the team. Also, there is some effort already done by a community member.

cherniavskii commented 1 year ago

Interesting, I find the current behavior intuitive πŸ˜…

I can't find one data grid that behaves like us

Gmail is one example:

https://github.com/mui/mui-x/assets/13808724/658f7153-bb99-447b-a45b-4a376b2831c1

But then Google Drive's behavior is the opposite πŸ˜…

https://github.com/mui/mui-x/assets/13808724/ccf2fc4c-656d-4a04-a344-dd4fb28b5eb9

cherniavskii commented 1 year ago

Duplicate issue: https://github.com/mui/mui-x/issues/3309

cndonovan commented 5 months ago

Seconding this issue; my team/my company would love to have the ability to enable "when clicking on header checkbox in an indeterminate state, select all (instead of deselect all)"