material-ui
material-ui copied to clipboard
[TableBody] Does not respect TableRow 'selectable' prop
Problem description
The TableBody component does not respect the TableRow's selectable property when rendering the Checkbox column. This can result in the checkbox not being disabled when it should be (the value of selectable changed dynamically for example).
Steps to reproduce
- Create a Table component, where the TableBody has
multiSelectableanddisplayRowCheckboxenabled. - Within the TableBody you have your
mapof items, each resulting in a TableRow being rendered. Theselectableproperty on each TableRow is determined based on some values of the item for that row. - Test this by having a single TableBody render 1 TableRow that has
selectable = trueand another that is false. The TableRow with false will have a checkbox that is not disabled, although it should be.
Versions
- Material-UI: 0.15.0
- React: 15.1.0
- Browser: Tested in Chrome (but shouldn't be browser dependent...)
@cody-lettau works now!