Bump formik from 2.2.9 to 2.4.0
Bumps formik from 2.2.9 to 2.4.0.
Release notes
Sourced from formik's releases.
formik@2.4.0
Minor Changes
2f53b70#3796 Thanks@probablyup! - Add support for Yup "transforms".formik@2.3.3
Patch Changes
f075a0c#3798 Thanks@probablyup! - Fixed the use of generics for theArrayHelperstype such thatany[]is the default array type and for each individual method the array item type can be overridden if necessary.formik@2.3.2
Patch Changes
f086b5a#3237 Thanks@pieplu! - ChangedgetInto return undefined when it can't find a value AND a parent of that value is "falsy" ( "" / 0 / null / false )
6d8f018#3792 Thanks@probablyup! - Update the type forsetFieldValueto reflect the returnedPromiseand potential returned error(s).formik@2.3.0
Minor Changes
73de78d#3788 Thanks@probablyup! - Added typescript generics toArrayHelpersinterface and its methods so that users who use TypeScript can set the type for their arrays and have type safety on array utils. I have also gone ahead and made supplying a type for the generic optional for the sake of backwards compatibility so any existing TS code that does not give a type for the FieldArray will continue to work as they always have.
39a7bf7#3786 Thanks@probablyup! - Yup by default only allows for cross-field validation within the same field object. This is not that useful in most scenarios because a sufficiently-complex form will have severalyup.object()in the schema.const deepNestedSchema = Yup.object({ object: Yup.object({ nestedField: Yup.number().required(), }), object2: Yup.object({ // this doesn't work because `object.nestedField` is outside of `object2` nestedFieldWithRef: Yup.number() .min(0) .max(Yup.ref('object.nestedField')), }), });However, Yup offers something called
contextwhich can operate across the entire schema when using a \$ prefix:const deepNestedSchema = Yup.object({ object: Yup.object({ nestedField: Yup.number().required(),
... (truncated)
Commits
-
f4e93beVersion Packages (#3800) -
a960c30issue#3747/issue-resolved/outline-none (#3748) -
2f53b70feat(validationSchema): support yup transforms in validate & submit (#3796) -
abbec18Version Packages (#3799) -
f075a0crefactor(ArrayHelpers): revise array typing and override pattern (#3798) -
9edb25fVersion Packages (#3795) -
f086b5aFix getIn unexpected value (#3237) -
75c69c1Remove mention of UMD build (#3523) -
0e93725Version Packages (#3794) -
6d8f018fix(types): setFieldValue returns a promise resolving to nothing or an error ... - Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
$dependabot rebasewill rebase this MR -
$dependabot recreatewill recreate this MR rewriting all the manual changes and resolving conflicts