Releases: jaredpalmer/formik
Releases Β· jaredpalmer/formik
v0.11.6
v0.11.5
Patch release
- Pass
name
as a prop to<FieldArray render>
v0.11.4
Patch release
- Add
validateForm()
to the FormikBag so you can imperatively validate stuff. - Fix definition of
dirty
when accessed via context.
Internal stuff
- Optimized state updates for
<FieldArray>
. - Refactor Formik bag getters internally
v0.11.3
Patch Release
#396 Modifies behavior of FieldArray's props.pop()
and FieldArray props.remove()
to remove relevant nested partials of from touched
and errors
objects in addition to values
so that validation works as expected with array manipulations.
Thank you @a-tarasyuk @davidhenley @rovansteen @timc13
v0.11.1
Patch Release
Fix handleReset
if onReset
is not specified
v0.11.0
β¨ Formik 11.0 β¨
The New stuff π β¨
- Support for both path and dot syntax for handling deep updates and arrays
<Field name="social.facebook" />
and<Field name="friends[1]" />
- Sync and Async field-level validation via
<Field validate={value => ...} />
- A new
onReset
prop for<Formik />
. - New
<FieldArray>
component - TypeScript 2.6.2 support, 2.7.x in the next few days
- React 16
import React from 'react';
import { Formik, Form, Field, FieldArray } from 'formik'
export const FriendList = () => (
<div>
<h1>Friend List</h1>
<Formik
initialValues={{ friends: ['jared', 'ian', 'brent'] }}
onSubmit={...}
render={formikProps => (
<FieldArray
name="friends"
render={({ move, swap, push, insert, unshift, pop }) => (
<Form>
{/*... use these however you want */}
</Form>
)}
/>
/>
</div>
);
Potentially Breaking Change β οΈ π π« PLEASE READ.
dirty
(and thus isValid
) has changed due to popular demand/consensus.
Old meaning: "has any field been touched?"
New meaning: "has any field value changed?"
Deprecations
handleChangeValue
has been removed entirely. It's been deprecated since 0.8
v0.11.0-rc.2
Patch Release
- Removed setFieldTouched call in
<FieldArray />
v0.11.0-rc.1
Formik 0.11.0 Release Candidate 1
The New stuff π β¨
- Adds optional bracket path support
- Fixes TypeScript 2.6.2 issue and improves type inferencing. Thank you @weswigham and the Microsoft TypeScript team for supporting Formik. Going forward, TypeScript core now checks / smoke tests against Formik (and Apollo) to make sure that any changes are either non-breaking, or coordinated.
- Added an example to the
next
branch of how to do a multi-step form wizard.
Potentially Breaking Change β οΈ π π« PLEASE READ.
dirty
(and thusisValid
) has changed due to popular demand/consensus.
Old meaning: "has any field been touched?"
New meaning: "has any field value changed?"
In the works π·ββοΈ π§
onReset: (values: Values, bag: FormikBag<Values>)
config / prop that runs prior to a resetFormunsafe_setFormikState: (whateveryouwant: any) => void
.submitCount
: Will track number of submit attempts- An optimized version of
<Field>
that does not rerender - Add
meta
property on<Field>
. - Leverage forthcoming context API
validateForm
,isValidating
Future π β
- softSubmit, handleSoftSubmit?
- async render funsies
v0.11.0-beta.1
Beta 1
- Fixed TypeScript types of
<FieldArray>
v0.11.0-alpha.4
Alpha 4
NO API CHANGES
Under the hood
- Updated to TypeScript 2.6.2, React 16, Enzyme 3, Jest 21