react-native-phone-number-input icon indicating copy to clipboard operation
react-native-phone-number-input copied to clipboard

value is not showing when using with react hook form

Open dtsuper3 opened this issue 1 year ago • 0 comments

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 ( <View style={[styles.c]}> <PhoneInput textInputProps={{ onFocus: () => setIsFocus(true), onBlur: () => { onBlur(); setIsFocus(false); }, }} value={value}

dtsuper3 avatar May 04 '23 21:05 dtsuper3