How to apply css to ngx-datatable checked row

413 Views Asked by At

I tried

.datatable-body-row:checked .datatable-row-group {
  background-color: #22e26c !important;
}

Nothing happens, while for hover it works, like this.

.datatable-body-row:hover .datatable-row-group {
  background-color: #abd4ee !important;
}

How can I make the row that is checked have custom color? Thank you.

1

There are 1 best solutions below

6
Schrader On

Did you try using .datatable-body-row.active ?

If you looking at their site you can select a row and look into dev tools to search for applied styles.

https://swimlane.github.io/ngx-datatable/#single-selection