'How to change the style of the Ag-grid header on sorting (React)?

It is clear from the official doc that I can change the header class using the "headerClass" prop.

However, I want to give the header a different style (specifically color) when its column is sorted.

Any advise about how to approach it?



Solution 1:[1]

For others who faced the same problem, you may change the following classes:

.ag-header-cell-sorted-asc {
        color: blue;
        font-weight: bold;
    }

    .ag-header-cell-sorted-desc {
        color: red;
        font-weight: bold;
    }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Moty D