Open hanza93 opened 1 year ago
You can use it. Just re-subscribing ref value using withMask function
<Controller
name="test"
render={({ field }) => {
return <input {...field} ref={withMask('9999-9999')}/>; // ✅
}}
/>
Hey @hanza93 im working on it, but for now you can use withMask
like @alysonvilela demostrate above. <3
@alysonvilela is problem with this solution because if you pass withMask as ref then primary functionality that scroll and focus element with errors stop working i mean if you set shouldFocusError
to true
We are using the controlled version for react-hook-form by using
useControl
hook. it would be awesome if we can useuseHookFormMask
withcontrol
too