Open oormilavarma opened 6 years ago
<PhoneInput keyboardType={'numeric'} initialCountry='in' value='+91' ref={(ref) => {this.phone = ref;}} onChangePhoneNumber={(number) => {this.setState({mobile_no: number})}} />
If I try to clear the phone input completely , the number is getting cleared and only the flag is resetting. And if I again choose the same country, the country code (or dial code) is not showing up. Is there any way I fix this?
Could you please share how to reset it's value? Thanks in advance
Hello, it's possible to set an empty value through component inner set state
phoneInputRef.current!.setState({ inputValue: '', })
<PhoneInput keyboardType={'numeric'} initialCountry='in' value='+91' ref={(ref) => {this.phone = ref;}} onChangePhoneNumber={(number) => {this.setState({mobile_no: number})}} />
If I try to clear the phone input completely , the number is getting cleared and only the flag is resetting. And if I again choose the same country, the country code (or dial code) is not showing up. Is there any way I fix this?