Add $ to only non zero values in number column in oj-table
Summary
Add $ to only non zero values in number column in oj-tableContent
Hi All,
I have used below template for one column in the table,
<template slot="price">
<oj-input-number value='[[typeof $current.data === "number" ? $current.data : null]]' readonly="true"
style="text-align: right; width:20px;"
converter='{"options":{"style":"currency","currency":"USD","currencyFormat":"standard","minimumFractionDigits":2,"maximumFractionDigits":2},"type":"number"}'>
</oj-input-number>
</template>
With the above template I am able to add $ symbol in front of all the values in the whole column.
I am looking for for any option in which the $ symbol is only be prefixed if value is greater than 0
Tagged:
2