I'm creating a lightning component with a
lightning:input, but I have an issue with decimal places and
This is my code:
<lightning:input name="foo" value="foo" type="number" formatter="currency" step="0.01"/>
Without decimal places is saved correctly:
Input: 3 Saved value: 3.00
But with decimal places it saves a wrong value:
Input: 0.03 Saved value: 3.00
Input: 4.32 Saved value: 432.00
What i'm doing wrong?
SOLVED! I wasn't serializing the list to JSON. Sending as JSON to the apex controller and deserializing in the apex controller solved the issue :).