Material-ui: [Table] selectable={false} doesn't hide select boxes

Created on 1 Dec 2015  Â·  4Comments  Â·  Source: mui-org/material-ui

Not all tables need select boxes. Most don't.

It would be nice if there was an easy way to remove the select boxes from a table. Doing selectable={false} just disables the select boxes. Is there a way to hide them completely?

Most helpful comment

I'll add to this answer, you also need to do: adjustForCheckbox={false} or you'll get an extra unwanted column in the header

All 4 comments

You can achieve this with these two props:

  • _displaySelectAll_ for <TableHeader>
  • _displayRowCheckbox_ for <TableBody>

Did I miss that in the documentation? Maybe I'll update it myself
On 3 Dec 2015 17:58, "Alexandre E" [email protected] wrote:

You can achieve this with these two props:

  • *_displaySelectAll={false} *_ for
  • *_displayRowCheckbox={false} *_ for

—
Reply to this email directly or view it on GitHub
https://github.com/callemall/material-ui/issues/2330#issuecomment-161688317
.

This works. Thanks. And it's also in the documentation. I just didn't look in the right place...

I'll add to this answer, you also need to do: adjustForCheckbox={false} or you'll get an extra unwanted column in the header

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

chris-hinds picture chris-hinds  Â·  3Comments

ghost picture ghost  Â·  3Comments

sys13 picture sys13  Â·  3Comments

TimoRuetten picture TimoRuetten  Â·  3Comments