material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[TableBody] Does not respect TableRow 'selectable' prop

Open cody-lettau opened this issue 10 years ago • 1 comments

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

  1. Create a Table component, where the TableBody has multiSelectable and displayRowCheckbox enabled.
  2. Within the TableBody you have your map of items, each resulting in a TableRow being rendered. The selectable property on each TableRow is determined based on some values of the item for that row.
  3. Test this by having a single TableBody render 1 TableRow that has selectable = true and 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 avatar Jun 22 '16 12:06 cody-lettau

@cody-lettau works now!

nehalbhanushali avatar Jul 05 '16 20:07 nehalbhanushali