mui-virtualized-table icon indicating copy to clipboard operation
mui-virtualized-table copied to clipboard

[QUESTION] How can i style the headers?

Open m-o-leary opened this issue 6 years ago • 1 comments

Hi,

I want to apply custom styles to my frozen header / column.

I am styling the background with:

.ReactVirtualized__Grid.topRightGrid, 
.ReactVirtualized__Grid.topLeftGrid,
.ReactVirtualized__Grid.bottomLeftGrid{
    background-color: ${Color.primary};
    color: ${Color.textColor2};
}

However the cellHeader style from MUI is taking precedence for the font color.

Any ideas?

Thanks

m-o-leary avatar Feb 20 '19 12:02 m-o-leary

I was able to apply some custom styling for the headers by adding some properties to my createMuiTheme({ overrides: { ... } }), e.g.:

createMuiTheme({
  ...,
  overrides: {
    MuiTable: {
      root: {
        '& .topRightGrid': {
          backgroundColor: 'inherit !important'
        },
      },
    },
  }
})

I notice this table component doesn't play well with the Dark theme, either, but I wasn't able to revise the styles related to cellHovered state.

Not sure if this will help you get the font color to stick for the headers, though.

jeffjenx avatar Apr 07 '19 19:04 jeffjenx