[Datagrid] Checkbox checked when no rows #1066
Labels
bug 🐛
Something doesn't work
good first issue
Great for first contributions. Enable to learn the contribution process.
Current Behavior 😯
When there are rows i.e.
rows={[]}
the checkbox is checkedExpected Behavior 🤔
If there are no rows the checkbox should not be checked
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 💳
The text was updated successfully, but these errors were encountered: