Material-table: rowStyle being overwritten by MuiTableCell-root

Created on 9 May 2019  路  3Comments  路  Source: mbrn/material-table

Describe the bug
Seems like despite rowStyle adding the styles for rows, MuiTableCell-root is overriding them (trying to increase the font size of the data in the table).

help wanted

Most helpful comment

Instead of being able to adjust it for all of the columns, you have to add cellStyle to each column with the fontSize you want. Like { title: "Name", field: "name", cellStyle: { fontSize: "12px" } }

All 3 comments

Actually rowStyle does not effect the inside cells. You may try MuiThemeProvider

@roseak I'm having the same problem you described - wanting to increase the font size of table cells, but attempting to do that via rowStyle is not working. Did you find any solution using MuiThemeProvider?

Instead of being able to adjust it for all of the columns, you have to add cellStyle to each column with the fontSize you want. Like { title: "Name", field: "name", cellStyle: { fontSize: "12px" } }

Was this page helpful?
0 / 5 - 0 ratings