Open art3mHQ opened 3 months ago
I faced the same issue on mobile application, and I think it's because displayText="input" tries to render an <input />
element and React Native of course doesn't support this. So I fixed by changing displayText="text" and passed to the react-number-format component a renderText prop to handle an input component to change the value, like this:
<PatternFormat
displayType="text"
format="(###) ###-##-##"
mask="_"
onValueChange={(value) => setTel(value.formattedValue)}
data-cy="phone"
value={tel}
placeholder="(099) 000-00-00"
renderText={(currentValue) => (<TextInput value={currentValue} />)}
/>
Thank you for responce, but i cant manage to make it work like you show, it did not throw an error but did not accept any input and not showing place holder
Got an error while running on ios React Native (Expo)
after trying to use like that
run into this issue only on ios
Chrome web version works fine