Notifications
Clear all
Sep 22, 2022 5:01 am
How to do formatting on currency fields and percentages in LWCs?
1 Reply
Sep 22, 2022 5:06 am
Learn more here: lightning-formatted-number - documentation - Salesforce Lightning Component Library
Here is an example:
<td> <lightning-formatted-number value={quoteItem.C1DDC__c} format-style="currency" currency-code={quoteItem.CurrencyIsoCode} minimum-fraction-digits="0"> </lightning-formatted-number> </td> <td>{quoteItem.C1DDP__c}</td> <td> <lightning-formatted-number value={quoteItem.C1DDAPPEMP__c} format-style="percent-fixed" currency-code={quoteItem.CurrencyIsoCode} minimum-fraction-digits="1"> </td>