react-currency-input-field
react-currency-input-field copied to clipboard
fixedDecimalLength causes value to be modified incorrectly
trafficstars
Describe the bug the prop "fixedDecimalLength" causes the value to lose 2 digits on blur.
To Reproduce This is my code (simplified):
<CurrencyInput
value={money}
onValueChange={(value) => {
setMoney(value)
}}
fixedDecimalLength="2"
/>
Expected behavior The value shouldn't change.
Additional context locale: 'en' Removing the fixedDecimalLength solves the problem