-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure correct error structure for array field with error that b…
…ecomes empty (#3785) * cleanup arrays if the last value, which is not undefined, gets removed from it (cherry picked from commit dcc63d9) * chore: improve changeset --------- Co-authored-by: Christoph Gruber <[email protected]>
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'formik': patch | ||
--- | ||
|
||
Fixed field error state for array fields that have an error and become empty through an API like `arrayHelpers.remove`. | ||
|
||
The prior behavior resolved the field error to `[undefined]`, now it is simply `undefined`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bc9cb28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
formik-docs – ./website
formik-docs-jared.vercel.app
formik.org
www.formik.org
formik-docs-git-master-jared.vercel.app
formik-docs.vercel.app