Open cwagner22 opened 10 months ago
Yes, that makes sense, as that would be closer to Intl.NumberFormat. But as it is a behaviour change, the best time to handle this will be with maximumFractionDigits, and minimumFractionDigits.
Meanwhile workaround is to handle it parent level by using Intl.NumberFormat.
<NumericFormat value={Intl.NumberFormat('en', {maximumFractionDigits: 1})} valueIsNumericString decimalScale={1} />
<NumericFormat value={51.97} decimalScale={1} />
renders 52.0 which is wrong in my opinion, it should be 52, without decimals.https://codesandbox.io/p/sandbox/decimalscale-demo-forked-7zky75
Related to
maximumFractionDigits
mentioned in https://github.com/s-yadav/react-number-format/pull/752