In the input if user types 5.08 and then presses backspace instead of input showing 5.0 it is getting converted to 5. Used v5.4.5. In previous version (v5.2.0) it is working perfectly fine
import "./styles.css";
import React from 'react';
import { NumericFormat } from "react-number-format";
import { useState } from "react";
const Input = React.forwardRef((props, ref) => {
return <input type="text" ref={ref} {...props}/>
})
export default function App() {
const [valuesObj, setValuesObj] = useState({});
return (
<div className="App">
<h3>
Demo for <code>onValueChange</code>
<h5>To see the value change, type something in the input field</h5>
</h3>
<p>
<NumericFormat
value={valuesObj.floatValue}
suffix="x"
decimalScale={2}
onValueChange={(values, sourceInfo) => {
setValuesObj(values);
}}
/>
</p>
<hr />
<code>{JSON.stringify(valuesObj)}</code>
<hr />
</div>
);
}
In the input if user types 5.08 and then presses backspace instead of input showing 5.0 it is getting converted to 5. Used v5.4.5. In previous version (v5.2.0) it is working perfectly fine
20260412-1826-24.3485910.mp4
Code