function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Robby LRobby L 

Lightning Web Components lightning-input-field Removes Decimal Places When Focus Is Lost

We are building a record edit form for a custom sObject.  When the user clicks into the lightning-input-field, and the user enters a value with decimals (ex. 123.456789), the value is displayed as such.  Once the user clicks away (changing focus), the value loses all of it's trailing decimals (displayed as 123).  Has anyone dealt with this issue?

Thanks
Nicolas KadisNicolas Kadis
Have you checked if your Number field on the custom SObject had Decimal Places set to 0? If so, changing that should format your lightning-input-field to the number of decimal places you define.

Hope that helps :)

Nicolas Kadis
Robby LRobby L
Yes, sir.  The field has Length set to 8, and Decimal Places set to 10.  It saves the value correctly, but displays it incorrectly.
Nicolas KadisNicolas Kadis
Could you provide some sample code from your record edit form?