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

Set value from state and validate not working

Open RiusmaX opened this issue 5 years ago • 0 comments

Hi,

I try to pre-fill the phone input field from the props, but when I apply the value with a setState() in the componentDidMount() of my component, the isValidNumber function returns false and my validation is not done.

I can't call the method this.phone.current.setState({}) because it's undefined in the componentDidMount()

What can I do? Thank you in advance for your answer

RiusmaX avatar Dec 21 '19 10:12 RiusmaX