Conditional Formatting Row Values
Summary:
Hi Team,
I am trying to format row values. Following the steps mentioned in the blog.
Below is my code, I don't see color change for the values
######################
<template slot="onHandTemplate">
<span :style="[[$functions.color($current.data)]]">
<oj-bind-text value="[[$current.data]]">
</oj-bind-text>
</span>
</template>
##################
PageModule.prototype.color = function(onHand){
if (onHand < 100) {
return {"background-color":"red"}
}
return {"background-color":"green"}
}
###################
{
"headerText": "Onhand",
"field": "QTY_ONHAND",
"sortable": "disabled",
"frozenEdge": "start",
" template": "onHandTemplate"
}
####################
Content (required):
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):