Skip to content

Releases: jaredpalmer/formik

v1.0.0-alpha.5

18 Apr 20:50
Compare
Choose a tag to compare
v1.0.0-alpha.5 Pre-release
Pre-release

What's New

  • Added innerRef to Field and FastField if they are string components.
  • Fix NaN behavior
  • Clean up some unused code
  • Improve internal TS type signatures

Commits:

v1.0.0-alpha.4

30 Mar 17:46
Compare
Choose a tag to compare
v1.0.0-alpha.4 Pre-release
Pre-release

Minor Release

New stuff

  • TypeScript 2.8 (#543)
    • Dramatically improved FormikTouched type signature thanks to conditional types.
    • There should be more improvements to type signatures coming soon.
  • Add replace array helper (#520)
  • Pass in next initialValues into FastField's reset function (#462)
  • New ways to use handleChange and handleBlur (#521)
    • You can now omit a name attribute when using handleChange and handleBlur if you pass them a string as the first argument. They have been modified to return a handler (like Preact's linkState helper). The curried handleChange handler also has the flexibility to accept either an event OR a string as it's argument--so you can use it with React Native's <TextInput onChangeText/> too! In other words, you can now do this...
// You can now do this....
<input onChange={handleChange('firstName')} value={values.firstName} />
// and in React Native
<TextInput onChangeText={handleChange('firstName')} value={values.firstName} />

Internals

  • Added testimonials to docs
  • Bumped up deps for TS
  • Official types test added

v1.0.0-alpha.3

14 Mar 20:17
Compare
Choose a tag to compare
v1.0.0-alpha.3 Pre-release
Pre-release

Minor Release

New Stuff

  • submitCount is now tracked by Formik state. More specifically, this tracks submit "attempts." It increments whenever either handleSubmit or submitForm are called (before Formik looks if there are errors present). It resets to 0 when either resetForm or handleReset are called. Note: this may be renamed submitAttemptCount in the future.
  • Updated docs
  • Improved build tooling

Commits

v1.0.0-alpha.2

27 Feb 23:03
Compare
Choose a tag to compare
v1.0.0-alpha.2 Pre-release
Pre-release

Patch Release

  • <FastField> now updates for external setter calls
  • handleSubmit now checks for the synthetic event before calling event.preventDefault() meaning it can now be used safely in React Native and saving you an arrow function.
  • Internal refactoring to reduce bundle size

Commits

  • Set state of value and error after validateYupSchema sync (#457) 6405d22
  • Point to the new .d.ts location eb13945
  • Close #448. Make fastfield update for external setter calls fde20a6
  • Allow handleSubmit to be called without preventDefault (#451) 12c100b
  • rename file formik to Formik (#452) 263befb
  • Merge branch 'master' of github.com:jaredpalmer/formik 0ce24e3
  • Add travis yarn cache d925c3a
  • Update ISSUE_TEMPLATE.md 0a83825
  • Update ISSUE_TEMPLATE.md 4f2a092
  • Simplify isPromise and add tests (#443) 74d8be4
  • Merge branch 'master' of github.com:jaredpalmer/formik 6bce509
  • Remove circular exports, shave bytes! 6c3e062
  • Fix typo in FieldArray example (#447) d36aa71

v1.0.0-alpha.1

21 Feb 22:59
Compare
Choose a tag to compare
v1.0.0-alpha.1 Pre-release
Pre-release

Alpha Release

New Stuff

  • <FastField>: This is an optimized version of <Field> that only re-renders when necessary. More documentation is necessary, but essentially, <FastField> keeps state locally if possible and then updates the parent <Formik> state only when the <FastField> is blurred (i.e. when onBlur is fired). The key insight is that 99% of time, only one field is changing at a time in your form. However, if you are doing complex validation wherein one input's value can cause an error in another input, <FastField> will act like <Field> and just re-render on each update. Depending on the feedback, <FastField> may replace <Field> entirely in the future. Please be gentle.
  • Curried handleChange and handleBlur: You can now optionally pass a dotpath / name to both handleChange and handleBlur and they will each return an optimized handler. This works like Preact's linkState mixin. So now you can do
    <TextInput onChangeText={handleChange('firstName')} value={values.firstName}/> in React Native and also just <input onChange={handleChange('firstName')} value={values.firstName}/> in React DOM.
  • Curried array helpers: Each array helper provided via <FieldArray> (e.g. push('something')) now also has a curried version of itself (e.g. handlePush('something')). You can use these to avoid an arrow function inside of render: <button onClick={arrayHelpers.handlePush('')}>Add</button>

v0.11.11

21 Feb 16:21
Compare
Choose a tag to compare

Patch Release

Bug Fixes

  • resetForm should reinitialize this.initialValues even if nextValues is not provided (#444)
  • Fixed empty input type=number results in NaN (#437)
  • <Field children/> can be a function or a node in TypeScript with strict mode (#426)

v0.11.10

10 Feb 01:03
Compare
Choose a tag to compare

Breaking change for React Native TypeScript vs. 11.9

  • Removed react native types (and GestureResponder type) for handleChange. This was causing pain and suffering for regular TypeScript users due to how react-native includes conflicting typings vs @types/node. 🤷‍♀️

We will have to make a separate formik-native package or build going forward. Sorry everyone!

v0.11.9

09 Feb 01:01
Compare
Choose a tag to compare

New stuff

  • Add new prop validateOnChange?: boolean to FieldArray, default is true to trigger validation function after array manipulations
  • Export setIn and getIn functions out of utils (undocumented) for power users

Bug fixes

  • Add safer calls to array methods in FieldArray
  • Add docs about validation gotchas when using FieldArray

Internals

  • Rename dlv to getIn
  • Rename setDeep to setIn and swap argument order
  • Update test names
  • Add react-dom types to dev

v0.11.8

09 Feb 01:06
Compare
Choose a tag to compare

Patch Release

  • Tweak TypeScript typings of FormikTouched so that it fully supports deeply nested forms. This fix is temporary and will be further improved when TypeScript 2.8 comes out in March and we can use the new conditional types. Thank you @weswigham for the help!

v0.11.7

09 Feb 01:07
Compare
Choose a tag to compare

Broken install. DO NOT USE.