Skip to content

Releases: jaredpalmer/formik

v0.11.6

07 Feb 21:12
Compare
Choose a tag to compare

New stuff

  • Add ability to skip running validation in setFieldValue and setFieldTouched b7a6c5b
  • Added react native types, fixed handleSubmit in rn/typescript (#379) 54db7ce 6a5d963

Bug fixes

  • Fix typings for FieldConfig['component'] (#409) d4c36db

Improvements

v0.11.5

05 Feb 21:41
Compare
Choose a tag to compare

Patch release

  • Pass name as a prop to <FieldArray render>

v0.11.4

02 Feb 21:08
Compare
Choose a tag to compare

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

01 Feb 22:45
Compare
Choose a tag to compare

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

01 Feb 18:37
Compare
Choose a tag to compare

Patch Release

Fix handleReset if onReset is not specified

v0.11.0

01 Feb 18:29
Compare
Choose a tag to compare

✨ 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

29 Jan 22:09
Compare
Choose a tag to compare

Patch Release

  • Removed setFieldTouched call in <FieldArray />

v0.11.0-rc.1

29 Jan 21:04
Compare
Choose a tag to compare

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 thus isValid) 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 resetForm
  • unsafe_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

14 Dec 16:27
Compare
Choose a tag to compare

Beta 1

  • Fixed TypeScript types of <FieldArray>

v0.11.0-alpha.4

14 Dec 16:28
Compare
Choose a tag to compare

Alpha 4

NO API CHANGES

Under the hood

  • Updated to TypeScript 2.6.2, React 16, Enzyme 3, Jest 21