I want to style specific column headers, basically setting different backgrounds and borders. It does not follow a predictable order so I cannot do this with CSS nth-child and such. I have to do it based on the columns I have.
I found that I can set className on a column, but this only applies to the cells. I tried the different header related class names like currentHeaderClassName and activeHeaderClassName but this seems to have no effect when set on a column.
I also cannot find any kind of “header renderer” API, even though there is a afterGetColHeaderRenderers which implies there’s a renderer defined somewhere…
I know I can use HTML in the col header string itself, but this is limited to just the inner text, so I can’t effectively manipulate the parent TH (since CSS can’t select a parent, yet) to set a background, for example.
I can use afterGetColHeader to manipulate the TH element, but this is a bit hard to use and only gives me the visual column index, but I’m using nestedHeaders and need to know the row as well.
So, this is a handful of questions or feature requests, depending on what I maybe missed. I want to:
- Set a column header class name, say
column.headerClassName. - Set a column header renderer, say
column.headerRenderer, with signature like(instance, TH, col, row, colHeader, columnProperties) => THwherecolHeaderis the value passed tocolHeadersornestedHeadersfor that specific TH, andcolumnPropertiesis the ColumnSettings for the column associated with that header. - Add
roworheaderLeveltoafterGetColHeader.