Switch case for color coding rows?

Hello dear forum. I already use {{ currentRow.sales > 10 ? 'green' : 'red' }} for row coloring conditions.. But it is growing heavily. Is there a better way to color them? Like switch case?

{{currentRow.result === 'Unable to log' ? 'red' : currentRow.result === 'You have either used the wrong ? 'yellow' : currentRow.result === 'Yet Another Condition'
? 'red'
: 'blue' }}

You could but you are essentially doing the same thing....not clear on if using switch case would be easier to manage or more performative...

1 Like

Thank you Scott, got you. Just thought that switch would be more visually appealing, but I failed miserably at Implementation :man_facepalming::sweat_smile:

1 Like