Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set value from state and validate not working #132

Open
RiusmaX opened this issue Dec 21, 2019 · 0 comments
Open

Set value from state and validate not working #132

RiusmaX opened this issue Dec 21, 2019 · 0 comments

Comments

@RiusmaX
Copy link

RiusmaX commented Dec 21, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant