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
Here, the submitErrors is deleted before checking hasSyncErrors. If we have any syncError (or errors, to be specific) here, submitErrors will be deleted, and the function will stop executing before generating an updated submitErrors.
However, it is more reasonable that the deleting and re-generatingsubmitErrors codes should be run or not run at the same time, and not the other way in which only deleting occurs without re-generating.
This way, submitErrors won't be unintendedly affected by whether syncErrors exist.
The text was updated successfully, but these errors were encountered:
leannechen
changed the title
submitErrors unexpectedly disappears when having both errors / syncErrors and submitErrors
submitErrors unexpectedly disappears when both errors (syncErrors) and submitErrors exist
Oct 7, 2021
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
When submitting form with both
syncErrors
andsubmitErrors
,submitErrors
from previous submit unexpectedly disappears without having an updated one.Steps to reroduce the problem
What is the expected behavior?
The "required" error on Field B exists.
What's your environment?
Other information
See Line 1090:
final-form/src/FinalForm.js
Line 1090 in 6a28f52
Here, the
submitErrors
is deleted before checkinghasSyncErrors
. If we have any syncError (orerrors
, to be specific) here,submitErrors
will be deleted, and the function will stop executing before generating an updatedsubmitErrors
.However, it is more reasonable that the deleting and re-generating
submitErrors
codes should be run or not run at the same time, and not the other way in which only deleting occurs without re-generating.This way,
submitErrors
won't be unintendedly affected by whethersyncErrors
exist.The text was updated successfully, but these errors were encountered: