enter image description here

ive been dynamically trying to assign styling based on click of a check box from the component itself but sue to some reasonit is not able to accept the condition ive applied:

<td scope="row" style="{!If(test.showTest==true ? 'background-color: #eee;' : '')}" data-aura-rendered-by="59:1991;a"><div class="wrap-class1" data-aura-rendered-by="60:1991;a">PACK 1</div></td>

1 Answer 1


Aura is case sensitive. In addition, you're using an if statement, not a ternary operator. It should be:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .