This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
When setFieldValue RN InputMasked crashed #329
Comments
It seems when you back that the ref isn't attached yet. Try put the setValue of inputMask like below setValue(ref: InputValueReference, value:string) {
inputValueRef.current.value = value;
// next line changed
inputElementRef.current?.setNativeProps({ text: value });
} Let me updated if it worked or not. |
I'm having the same issue, with the input configuration provided by documentation (https://unform.dev/examples/react-native-input-mask), is not possible to adjust the line as you instructed, it shows this error |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a step-by-step registration screen.
I show the component on the screen like this:
I go to step 2 and then back to step 1 I use the function setFieldValue to keep the value in the input.
But Input Masked gives an error.
Only Masked, Simple Input is ok.
Can you help me?
The text was updated successfully, but these errors were encountered: