Closed rickanutyi closed 6 months ago
I just realized there is data field that has value i need. But typescript dont know about it. And i need to change the value that way I dont think it right way to work with react
We are currently working on being able to change the value before masking the input, we will include this feature in the next release.
The new version adds the track
method, with which you can conditionally change the entered value.
You can intercept input to change the entered value every time the value in the input element changes. See Track.
npm i @react-input/mask@latest
Hi, i am using react-input/mask
<InputMask ref={forwardedRef} mask="996(___)___-___" replacement="_" showMask type="number" {...props} />
When a user pastes a copied value, for example, 996333222111, the input value should be formatted as 996(996)333-222. I would like to have a method where I can get the value before it is processed by the mask, so I can determine if '996' is already present in the value entered by the user and remove it.
I tried to use onBeforeInput or onBeforeInputCapture? but thay give me value as 996(996)333-222