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] Checkbox checked when no rows #1066

Closed
2 tasks done
bigandy opened this issue Feb 17, 2021 · 1 comment · Fixed by #1068
Closed
2 tasks done

[Datagrid] Checkbox checked when no rows #1066

bigandy opened this issue Feb 17, 2021 · 1 comment · Fixed by #1068
Labels
bug 🐛 Something doesn't work good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@bigandy
Copy link
Contributor

bigandy commented Feb 17, 2021

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When there are rows i.e. rows={[]} the checkbox is checked

Screenshot 2021-02-17 at 11 58 24

Expected Behavior 🤔

If there are no rows the checkbox should not be checked

Screenshot 2021-02-17 at 11 59 03

Steps to Reproduce 🕹

https://codesandbox.io/s/material-demo-forked-x1phw?file=/demo.tsx

Steps:

1.<DataGrid checkboxSelection columns={data.columns} rows={[]} />
2.Notice that the checkbox is checked

Your Environment 🌎

"dependencies": {
"@emotion/react": "11.1.5",
"@emotion/styled": "11.1.5",
"@material-ui/core": "5.0.0-alpha.25",
"@material-ui/data-grid": "4.0.0-alpha.20",
"@material-ui/icons": "latest",
"@material-ui/lab": "latest",
"@material-ui/x-grid-data-generator": "latest",
"@types/react": "latest",
"@types/react-dom": "latest",
"react": "latest",
"react-dom": "latest",
"typescript": "latest"
}
see https://codesandbox.io/s/material-demo-forked-x1phw

Order id 💳

@bigandy bigandy added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 17, 2021
@dtassone dtassone added bug 🐛 Something doesn't work good first issue Great for first contributions. Enable to learn the contribution process. and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 17, 2021
@bigandy
Copy link
Contributor Author

bigandy commented Feb 17, 2021

@dtassone is it okay if I make a PR to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants