Last 12 weeks ยท 0 commits
4 of 6 standards met
Summary Adds as an optional peer dependency so Formik's shipped files resolve under strict pnpm (). Marks it optional via so JS-only consumers are not warned. Fixes #4063 Test plan [ ] Confirm lists under and [ ] In a pnpm project with , installing + should typecheck without for [ ] Existing npm/yarn installs should be unchanged
Description Fixes #3754 Fixes an issue where multiple consecutive calls could trigger validation using stale form values. When was called multiple times asynchronously, the validation triggered by a later call could use an outdated . This could result in stale validation errors even though the form values had already been updated. Changes Build the validation values from when handling . Pass those current values to . Add a regression test covering multiple asynchronous calls with a Yup validation schema. Testing โ 89 tests passed โ 227 tests passed โ passed
Bug report Current Behavior We have a use case where fields need to be updated as the result of an async function, very similar to this example. However, we would like to update multiple fields. We find that when we use things work as expected, however when we make multiple calls to it results in an error. This doesn't happen if the calls to happen as an immediate callback ( e.g. from a button ) but when the callback happens after an async action, things go a little awry. The obvious, initial solution is to just use , but we may want to update these fields individually given certain circumstances ( e.g. if x, then update y but not z ) Expected behavior Multiple calls to should not trigger validation errors when the form is valid. Reproducible example Live example: https://d4pe7b.csb.app/ Codesandbox: https://codesandbox.io/s/proud-wind-d4pe7b?file=/src/App.js Your environment
Repository: jaredpalmer/formik. Description: Build forms in React, without the tears ๐ญ Stars: 34317, Forks: 2779. Primary language: TypeScript. Languages: TypeScript (94%), JavaScript (4%), CSS (1.9%), Shell (0%). License: Apache-2.0. Homepage: https://formik.org Topics: form, formik, forms, higher-order-component, hooks, react, react-hooks, react-native, render-props. Latest release: formik@2.4.9 (10mo ago). Open PRs: 100, open issues: 742. Last activity: 10mo ago. Community health: 100%. Top contributors: jaredpalmer, quantizor, github-actions[bot], maddhruv, snyk-bot, imgbot[bot], Andreyco, johnrom, prichodko, hmmChase and others.