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

Remove error message when value of field is updated #17

Closed
sdevil7th opened this issue Jan 31, 2019 · 1 comment
Closed

Remove error message when value of field is updated #17

sdevil7th opened this issue Jan 31, 2019 · 1 comment

Comments

@sdevil7th
Copy link

sdevil7th commented Jan 31, 2019

When you validate your input field once and the error message appear, if you update the value from other methods (I tried by getting the value from an api call and updating the value in state, which updates the value but message still remains) than focussing the input field and trying to update it, the message won't go away, even if you trigger the validation by setting validate to true. the only option is to click on the input field and onBlur it will validate the specific field and remove the message.

Describe the solution you'd like
If the same validation happening on blur event, could be done for validate as well, I think it'll be better.

edwardfxiao pushed a commit that referenced this issue Jan 31, 2019
…> ```nextProps.validate !== prevState.validate```. Fix for issue #17.
@edwardfxiao
Copy link
Owner

edwardfxiao commented Jan 31, 2019

Hi @sdevil7th , please check v2.1.6, which should fix this problem if I understand you correctly.
Demo: https://codesandbox.io/s/zkp7mxry4x

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

2 participants