final-form / final-form/react-final-form
Validating field is never set to false if user unfocus too fast
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
Bug.
### What is the current behavior?
Right now, when you want to perform an async validation for a field, there's a `validating` property on `meta` object. When you perform a blur event when validation is in progress, then `validating` field will never be set to `false`.
Steps to reproduce:
1. Go to an [example from docs](https://codesandbox.io/s/react-final-form-asynchronous-field-level-validation-example-0dj38)
2. Type something in "Username" field so that you will see a spinner in top-right corner
3. Hit "Tab" so that you will focus on a next input field
4. You will see that spinner is still visible (because `validating` property is set to `true`).
### What is the expected behavior?
`validating` field is set to `false` no matter if user is focused on input or lost his focus.
### Sandbox Link
This is from list of examples from documentation. Just change time passed to `sleep()` function to higher value (1.5 - 2 seconds will be enough).
Is it a known issue?
Contributor guide
Assessment
This issue has not been assessed yet.