Closed wenscl closed 3 years ago
I'm assuming you want to expand the rows on click but not see the expand button? If so, one option is to override the ExpandButton component and just have it render a null object. You can see how to override the expand button in this example:
https://github.com/gregnb/mui-datatables/blob/master/examples/expandable-rows/index.js
You'd also need to set the expandableRowsHeader option to false, so that the Expand All header wasn't visible.
I load the table with all rows expanded so i don't need that column. I tried your solution but it only hides the buttons, the column is still showing.
Looks the problem is the "MuiTableCell-paddingCheckbox" class, which is adding padding and width to the cell. You can get around this by overriding that class. Here's an example that shows how to do that:
https://codesandbox.io/s/muidatatables-custom-toolbar-forked-mjmnp?file=/index.js
Thanks! I set display=none to that class and it worked.
Is there a way to hide the column of expandable buttons?