Material-table: Can't change row's text color using rowStyle

Created on 4 Oct 2019  路  5Comments  路  Source: mbrn/material-table

Describe the bug
I am trying to style the row text color on the table. I managed to change the background color just fine, but for some reason, the text won't change colors at all.

To Reproduce
Create a table then use this as the option props:

options={{
 rowStyle: {
   backgroundColor: '#334551', 
   color: 'white !important', // not working! i tried without the !important as well
 },
}}

The background color will change but the text color remains the same.

Screenshots
The row text is supposed to be white, but as you can see, it doesn't work.

image

Desktop:

  • OS: Windows 10
  • Browser: Opera
  • Version 63.0.3368.94
bug help wanted wontfix

Most helpful comment

PRs are welcome.

All 5 comments

PRs are welcome.

I've found a way how to accommodate this, please let me know where do you prefer it to be specified. Is it at options for rowStyle or cellStyle? IMHO i would say cellStyle

I created a PR for this so that table cells inherit a color by default

PR for cellStyle to actually take effect.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kfirshahar picture kfirshahar  路  3Comments

Likurg2010 picture Likurg2010  路  3Comments

jlgreene2 picture jlgreene2  路  3Comments

slevy85 picture slevy85  路  3Comments

ModPhoenix picture ModPhoenix  路  3Comments