You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to setFieldValue within onPaste callback prepends the field value instead of replacing it.
Expected behavior
setFieldValue should replace the field value
Reproducible example
The templates are outdated (very old React/Formik versions) I couldn't get them to work without refactoring the entire thing.
This is the code I'm using
Seems like it is not formik error itself. Yes event.preventDefault() should fix your problem.
There is an example without formik and it works as you described:
Bug report
Current Behavior
When trying to setFieldValue within onPaste callback prepends the field value instead of replacing it.
Expected behavior
setFieldValue should replace the field value
Reproducible example
The templates are outdated (very old React/Formik versions) I couldn't get them to work without refactoring the entire thing.
This is the code I'm using
Your environment
The text was updated successfully, but these errors were encountered: