garganurag893 / react-native-phone-number-input

React Native component for phone number.
MIT License
377 stars 219 forks source link

value is not showing when using with react hook form #141

Open dtsuper3 opened 1 year ago

dtsuper3 commented 1 year ago

I am using it with react hook form. I have created a wrapper component using the react-hook-form controller. So the issue here is the value property not updating the UI but it is reflecting in props. I think some issues related to component re-rendering. <Controller control={control} name={name} render={({field: {value, onChange, onBlur}, fieldState: {error}}) => { console.log('value:', value); return (

setIsFocus(true), onBlur: () => { onBlur(); setIsFocus(false); }, }} value={value}