jaredpalmer / formik

Build forms in React, without the tears 😭
https://formik.org
Apache License 2.0
33.91k stars 2.79k forks source link

ref: add typing to setFields functions #3824

Open kader93t opened 1 year ago

kader93t commented 1 year ago

Make setFieldValue fully typed Make setFieldError, setFieldTouched, validateField filed param typed.

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: f8225cc828a3e1c027f90e2147ed54a4369032a7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
formik-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2023 4:17am
mrskiro commented 1 year ago

hi, thanks for all the maintenance. Do you have any plans to have this PR merged? @jaredpalmer

quantizor commented 1 year ago

Work has been a bit nuts lately, probably will not get to this for a bit sorry. If I find some energy to maintain in my personal time I'll take a look

quantizor commented 1 year ago

Started to look into this and I'm not sure it's safe to change outside of semver-major, see some of the component files

nulldef commented 1 year ago

I really like the idea, thanks @kader93t! But unfortunately, it wouldn't work with some features like settings the value by its path, for instance:

setFieldValue('user.email', email)