gregnb / gregnb/mui-datatables
selectToolbarPlacement: 'none' and isRowSelectable not working well together
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
selectToolbarPlacement: 'none'
isRowSelectable: boolean function, e.g.
```
isRowSelectable: (dataIndex) => {
return dataIndex % 2 === 1;
}
```
Expected:
Clicking on select all checkbox in the header selects all items which are selectable.
Current:
Nothing is selected. If selectToolbarPlacement is set to 'above' or 'replace', it is working well.
https://codesandbox.io/s/vigorous-mendel-t8bjs
| Tech | Version |
|--------------|---------|
| Material-UI | 4.11.2 |
| MUI-datatables | 3.7.3 |
| React | 17.0.0 |
| browser | Any |
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked CodeSandbox reproduction and compare select-all behavior with selectToolbarPlacement set to 'none' versus 'above' or 'replace'. Trace how isRowSelectable is applied when the header checkbox is clicked; done means the header selects all selectable rows while leaving non-selectable rows unselected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100