thegamenicorus / react-native-phone-input

Phone input box for React Native
https://www.npmjs.com/package/react-native-phone-input
MIT License
395 stars 449 forks source link

Set value from state and validate not working #132

Open RiusmaX opened 4 years ago

RiusmaX commented 4 years ago

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