I currently have a table that highlights a row based on the value of a field (checkbox). The user can modify the value of that field with a row action that checks/unchecks the box. The javascript used on my table is
var field = arguments[0];var value1 = arguments[1];
var row = field.row;
var value2 = row.Action_Required__c;
skuid.ui.fieldRenderers[field.metadata.displaytype]field.mode;
if ((field.mode == ‘readonly’) && (value2 === true))
{ field.item.element.addClass(“LeadTab_highlighted-row”);}
the CSS to highlight the row is
table.nx-skootable-data tbody tr.LeadTab_highlighted-row td
{background-color: LightCoral;}
My row action is
1. Update Field to True
2. Save Model: Opportunity
When the user clicks the row action, the row is highlighted lightcoral and works as intended.
Then there is another row action that
1. Updates Field to False
2. Save Model: Opportunity
This row action doesn’t un-highlight the row and stays red unless I refresh the page. Currently, I have it set to re-query the model (step 3) which solves my issue but it does slow down the process of unhighlighting a bit. Is there a way to have to get the row to un-highlight without having to query the model again?
I couldn’t find the thread where I got the JS and CSS for table highlighting but thank you for everyone’s help!
Question
Table highlighting/Un-Highlighting without having to query model

Translate
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.