How can I change the header's background color in react-table based on a selected item? For example, if I click on ID, the ID header should change its background color to red.
I have tried various methods to update the background color upon selection.
Custom CSS
.ReactTable .rt-th {
-webkit-box-flex: 1;
-ms-flex: 1 0 0px;
flex: 1 0 0;
white-space: nowrap;
text-overflow: ellipsis;
padding: 7px 5px;
overflow: hidden;
transition: 0.3s ease;
transition-property: width, min-width, padding, opacity;
background: green;
}