Closed classicalguss closed 4 years ago
@classicalguss Hi
Validation works with promises. Also setState
is asynchronous. So you cannot predict when it will be ready.
As a workaround you can try this:
handleFullnameChange = (fullname) => {
console.log(fullname);
this.setState({ fullname }, () => {
this.refs['form'].isFormValid(false).then((response) => {
console.log("is Valid "+response)
});
});
}
closed due no activity
I have the following code
And this too
I'm expecting that when I type 3 characters that the log will return "is Valid true". Instead it returns "is Valid false" on the first 3 times I type a letter, and then returns "is Valid true" on the 4th time.