Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change line color #599

Open
rodrigodesp opened this issue Jun 14, 2018 · 2 comments
Open

how to change line color #599

rodrigodesp opened this issue Jun 14, 2018 · 2 comments

Comments

@rodrigodesp
Copy link

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
Copy link
Author

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

@breitling
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants