I want to change subrow css #261
-
|
Hello! I refer to the following page to implement subrow. As mentioned in the previous question, the size of the table is fixed, so there is a problem that the indentation of subrows does not occur. So I'm trying to change the font-weight to put a difference. So when I declared the columns I wrote: If Contrary to expectations, a random line turns bold every time it renders. (Presumed to be order dependent) Can I change the color and thickness of only the row except the sub row? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Welp don't do it that way. Manual mutations like that in React are not good. Just use the You probably want something like muiTableBodyCellProps: ({ cell, row }) => ({ //get your data from row.original probably
sx: {
fontWeight: condition ? 'bold' : 'normal'
}
}) |
Beta Was this translation helpful? Give feedback.

Welp don't do it that way. Manual mutations like that in React are not good. Just use the
muiTableBodyCellPropsdirectly in your column definitions. I suggest reading the Customizing Components Guide Docs where this is discussedYou probably want something like