LightningFlowComponents
LightningFlowComponents copied to clipboard
*Datatable 4.0.5* - _percentage field_ - Locale is messing up the percentage visualization
Steps to reproduce
Steps to reproduce the behavior:
- set user locale to Germany(Germany). The problem is present also with others locale (italy, spain, france, etc..)
- create a record with a percentage field with a value of 0.1000000000000001 or any number with 16 decimal digits
- use the datatable component to show that record
- notice that the percentage is multiplied by 1000000000000000
Expected behaviour
the percentage field should be showed as it is set in the record
Actual behaviour
the percentage field is multiplied by 1000000000000000 and the component shows an incorrect percentage
Screenshots
Additional notes
the problem disappears with locale equals to English(US) or English(UK)
I've looked into this issue and I'm unable to resolve it at this time. The conversion is happening when passing the value from the LWC to the Apex controller. The LWC has the correct format but the Apex initializes with the incorrect value.
I suggest trying to use decimal fields instead of percent fields and see if that works differently for you.