Build forms in React, without the tears π
APACHE-2.0 License
Bot releases are hidden (Show)
validate
: #2195Huge 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
initialValues
and a value
wasn't specified at /. Now we are nicer about it, and set the next value
to true
instead of throwing.Huge thanks to @mackness, @JanCizmar, @is2ei, @leonvisscher, @stephan281094, and @brentvatne for helping!
https://github.com/jaredpalmer/formik/compare/v2.1.2...v2.1.3
prepareDataForValidation
. (#2265)LowPriority
from scheduler
innerRef
type signature (#2325)handleChange
/ handleBlur
typings (#2472)@typescript-eslint/unbound-method
warning.prepareDataForValidation
. (#2265)Huge thanks to @brunohkbx, @aloeugene, @mstanielewicz, @krailler, @zslabs, @whazap, @jcolbyfisher, @jkimbo, and @lukebrobbs for helping!
Huge thanks to @mackness, @JanCizmar, @is2ei, @leonvisscher, @stephan281094, and @brentvatne for helping!
validate
: #2195Huge thanks to @brunohkbx, @Menardi, @gwn, @fabb, and @jamesmosier for helping!
Huge thanks to @BjoernRave, @emrosenf, @kristenmills, @dremex, @zachintosh, and @deini for helping!
value
was not specified on a checkbox as well as when there is just one checkbox.FieldArray
to use latest values for validation: #2166Huge thanks to @wallymathieu, @eliamaino-fp, and @mrmuhammadali for helping!
https://github.com/jaredpalmer/formik/compare/v2.1.1-canary.0...v2.1.1-canary.1
Huge thanks to @wallymathieu, @eliamaino-fp, and @mrmuhammadali for helping!
Add FieldHelpers
object to the array returned by useField
: #2124. This
exposes three helper functions to allow you to imperatively change the
field in question:
setValue(value: any)
setTouched(value: boolean)
setError(value: string)
Before
const MyInput = (props) => {
const formik = useFormikContext()
const [field, meta] = useField(props)
const handleThing = () => {
formik.setFieldValue(props.name, 'boop')
}
// ...
}
After
const MyInput = (props) => {
const [field, meta, helpers] = useField(props)
const handleThing = () => {
helpers.setValue('boop')
}
// ...
}
Huge thanks to @drivasperez for helping!
Huge thanks to @viniciusdacal for helping!
https://github.com/jaredpalmer/formik/compare/v2.0.10...v2.0.11
https://github.com/jaredpalmer/formik/compare/v2.0.8...v2.0.9
https://github.com/jaredpalmer/formik/compare/v2.0.7...v2.0.8