I am trying to set styling for a particular column header in my React Ag-grid app.
From reading the documentation I am using ag-theme-balham and I have created a new class in my css file:
.ag-theme-text-right {
font-size: xx-large;
color: red;
text-align: right;
}
I apply the class to a particular column using the headerClass.
{
headerName: "Comic", field: "price", headerClass: 'ag-theme-text-right'
}
When I run the app, the font size and color styles are applied but the text is still left aligned.
From inspecting in my browser, the .ag-header-group-cell-label, .ag-header-cell-label overwrite the headerClass. Notably 'display: flex' is enforcing the text alignment. When I disable 'display: flex' the text-align in my class takes effect.
Is it possible to apply the styling by just passing a class in the headerClass? Or do I need to do something more advanced?