ng2-table icon indicating copy to clipboard operation
ng2-table copied to clipboard

how to change line color

Open rodrigodesp opened this issue 6 years ago • 2 comments

I want to change the color of the line when the column contains a specific value, how do make it

ex.: Where Salary > 100.000 I want to put the green color to row

rodrigodesp avatar Jun 14 '18 01:06 rodrigodesp

I would like to put the properties rows (?Array) - only list of the rows which should be displayed className (string|Array) - additional CSS classes that should be added to a row

rodrigodesp avatar Jun 14 '18 04:06 rodrigodesp

Here is how I added table row color. I added an [ngClass]="{ 'selected': config.method(row) }" to the tr tag of the table body in ng2-table source files. I then added a method to my config object in my component where I used the ng-table component. This method tested the column that contained the value I wanted to test and returned true when the specific value was there.

And bing, bang, boom, the table had colored rows when the correct value was in the column.

breitling avatar Sep 02 '20 14:09 breitling