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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

onBlur sets field invalid for split second while field is actually valid #1863

Open
dommuldoon opened this issue Oct 8, 2019 · 1 comment
Labels

Comments

@dommuldoon
Copy link

dommuldoon commented Oct 8, 2019

馃悰 Bug report

Current Behavior

We are trying to send and validation errors to gtm datalayer. The problem is - while you dont see this in normally using the site the field is actually seen as invalid onBlur ( touched and error === true ) and this causes our function to send the event to the datalayer to be called even though the field is valid.

You can see here while paused in debugger the field is invalid but actually is valid as there is data in the field.

Screenshot 2019-10-08 at 10 33 11

Expected behavior

Field should not be invalid even for split second while validating onBlur and no validation event should sent whilst the field is valid.

We are basically implementing something very similar to this idea:

https://codesandbox.io/embed/formik-example-integrating-api-errors-with-status-wijwe

Additional context

Your environment

Software Version(s)
Formik 1.5.8
React 16
TypeScript 3.5.3
Browser
npm/Yarn npm
Operating System
@vsubbotskyy
Copy link

might be related to the issue with crossvalidation

@stale stale bot added the stale label Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants