jsillitoe / react-currency-input

React component for inputing currency amounts
MIT License
203 stars 163 forks source link

Precision={0} with suffix=",00" make the value passed on onChangeEvent wrong #91

Open Mathitos opened 5 years ago

Mathitos commented 5 years ago

You can reproduce using

<CurrencyInput
            prefix="$ "
            precision={0}
            suffix=",00"
            decimalSeparator=","
            thousandSeparator="."
            allowEmpty
            placeholder="buggy"
            value={null}
            onChangeEvent={(v1,v2,v3) => console.log(v1,v2,v3)}
          />