formik

Build forms in React, without the tears 😭

APACHE-2.0 License

Downloads
11.2M
Stars
33.5K
Committers
456

Bot releases are visible (Hide)

formik - [email protected] Latest Release

Published by github-actions[bot] about 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

  • 41720c2 #3862 Thanks @yazaldefilimonepinto! - Forward className for custom components used with Field

  • da58b29 #3858 Thanks @alaanescobedo! - Remove use of deprecated StatelessComponent type in favor of FunctionComponent

  • 5c01ee7 #3872 Thanks @rajpatelbot! - FIX: Fixed resetForm function dependency issue

formik - [email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] about 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 2b194c2 #3808 Thanks @NagaiKoki! - fix type of setFieldValue function

  • 708bcb2 #3813 Thanks @probablyup! - Revert FieldArray "shouldComponentUpdate" performance optimization. As it turns out, it's a common use case to have JSX controlled via non-Formik state/props inside of FieldArray, so it's not safe to cancel re-renders here.

  • 187e47d #3815 Thanks @probablyup! - Revert Yup transform support for the time being, this may be re-introduced in a future release under an opt-in prop.

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • f075a0c #3798 Thanks @probablyup! - Fixed the use of generics for the ArrayHelpers type such that any[] is the default array type and for each individual method the array item type can be overridden if necessary.
formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • f086b5a #3237 Thanks @pieplu! - Changed getIn to 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 for setFieldValue to reflect the returned Promise and potential returned error(s).

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • 73de78d #3788 Thanks @probablyup! - Added typescript generics to ArrayHelpers interface 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 several yup.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 context which can operate across
    the entire schema when using a \$ prefix:

    const deepNestedSchema = Yup.object({
      object: Yup.object({
        nestedField: Yup.number().required(),
      }),
      object2: Yup.object({
        // this works because of the "context" feature, enabled by $ prefix
        nestedFieldWithRef: Yup.number()
          .min(0)
          .max(Yup.ref('$object.nestedField')),
      }),
    });
    

    With this change, you may now validate against any field in the entire schema,
    regardless of position when using the \$ prefix.

formik - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

formik -

Published by jaredpalmer over 1 year ago

Patches

  • Fix broken formatting on useField docs: 587c5eea593068522e34c1afe939989621fac8a3
  • Merge pull request #2175 from zingerj/patch-1: 7173d748b41fde7fe542bb1276ae34692a7eaa60
  • Fix hasOwnProperty: #2178
  • Fix for Object-like data without hasOwnProperty: #2177
  • Fix now.sh upstream: 4b23009f5ae211d9674f10cacffd14d15b0f5678
  • Fix now docs deploys by specifying node engine: 7f00fd6ef130dba331215fc51f81e7fd8db949bf
  • Add generic to FieldHelperProps typings: #2179
  • Run tests on node 12: 9c1b0d0f792514370e4542c833217fe1698acb66
  • Fix typo in Field documentation: #2183
  • Patch to getValueForCheckbox to resolve issues with undefined values: #2188
  • Fix use event callback in handlers: #2187
  • Update type of as and component props in FieldConfig to enable using forwardRef wrapped components with Field and FastField (#2193): #2182
  • Trigger onReset when resetForm is called, not just handleReset: #2201
  • Upgrade deps: #2203
  • Document the v2 breaking change of validate: #2195
  • Add submitForm to FormikHelpers to allow form re-submit: #2185
  • Run validationSchema for validateField calls: #1784
  • Expose formikbag as imperative methods: #1972

Credits

Huge thanks to @BjoernRave, @emrosenf, @kristenmills, @dremex, @zachintosh, @deini, @brunohkbx, @Menardi, @gwn, @fabb, and @jamesmosier for helping!

https://github.com/jaredpalmer/formik/compare/v2.1.1...v2.1.2

formik -

Published by jaredpalmer over 1 year ago

Patches

  • Start examples page: 8f998ae09b9737f60456767673a737ad39de6693
  • Be nicer around unspecified checkboxes: #2198. Previously, Formik would throw if a checkbox's key wasn't specified in initialValues and a value wasn't specified at /. Now we are nicer about it, and set the next value to true instead of throwing.
  • Fix compat with latest @types/react: #2214
  • Attempt to fix codesandbox: #2218
  • Try using forwardRef (bypassed commit hooks, sorry!): 67ff97087f714f4d97d04b1897686e3b1766f083
  • Revert "Try using forwardRef (bypassed commit hooks, sorry!)": 4ff1c5cf52291848ed5158fb2bdb74e946d27866
  • Update useField docs: #2233
  • Update field.md: #2228
  • Update SECURITY.md to conform to semver: #2227
  • Make num of rows in example equal: #2226
  • Fix grammar and typos: #2225
  • Load Snack code from external source so it stays up to date: #2242

Credits

Huge thanks to @mackness, @JanCizmar, @is2ei, @leonvisscher, @stephan281094, and @brentvatne for helping!

https://github.com/jaredpalmer/formik/compare/v2.1.2...v2.1.3

Package Rankings
Top 0.27% on Npmjs.org
Top 3.35% on Proxy.golang.org
Badges
Extracted from project README
Stable Release Blazing Fast gzip size license Discord