The question may not be crystal clear, but I am struggling to come up with a better way to phrase it. My goal is to emphasize a table row using ng-class and conditions. Here's the snippet of code I'm currently working with:
<tr ng-class="{selectSuccess: selectedRows.indexOf(rowData.entity_id) > -1,
danger: rowData.total_received < rowData.total_sold,
info: rowData.total_received > rowData.total_sold}">
In this code, I have three conditions and corresponding classes. The danger
and info
classes are applied on page load when they evaluate to true, but the selectSuccess
class is only applied when a row is selected. Is there a way for me to make the selectSuccess
class more prominent by adding !important in CSS? I've attempted this without success. Alternatively, can I make the other conditions false when a row is clicked?
Note: I can provide the complete code if necessary, but my main focus is on toggling the class, hence I have included only the essential part.