Skip to content

Releases: final-form/final-form

v5.0.1

Choose a tag to compare

@erikras-richard-agent erikras-richard-agent released this 05 May 07:46
89f45a2

v5.0.1

A big batch of bug fixes that have accumulated since the v5.0.0 release. No breaking changes.

New

  • ignoreUnregister config option — Fields that unregister will have their values ignored during validation and submission, without needing destroyOnUnmount. Useful for multi-step forms. (#500)

Bug Fixes

Validation

  • Fixed async validation race condition — per-field async promises are now tracked individually so stale results from previous runs can't overwrite current ones (#513, fixes #509)
  • Fixed infinite loop when an async validation promise rejects — the stale promise is now cleared so it can't retry forever (#530, fixes #166)
  • Fixed validation not running correctly when a field has both array-level and item-level validators (#524, fixes #482)
  • Fixed crash when a field is unregistered while validation is in-flight (#531, fixes #186)
  • Fixed crash when getValidators encounters an undefined field (#532, fixes #158)

Submission

  • Fixed beforeSubmit not being called before the sync errors check — it can now prevent submission even when there are no sync errors (#522)
  • Fixed submitErrors being wiped when sync validation fails after a failed submission (#521, fixes #437)

Field State

  • Fixed keepDirtyOnReinitialize not working correctly with array fields (#538, fixes #366)
  • Fixed modified flag not being cleared after reset() / initialize() (#536, fixes #317)
  • Fixed dirty state not being tracked for unregistered FieldArray fields (#528, fixes #487)
  • Fixed crash when unregistering a field that had been renamed (#533, fixes #191)
  • Fixed initialValues not updating when a field's initialValue prop changes (#543, fixes #988)

Values / setIn

  • Fixed decimal, negative, and zero-padded numbers being treated as array indexes instead of object keys (e.g., values["1.5"] no longer becomes an array) (#526)
  • Fixed string error values being lost when removing nested field keys in setIn (#527)
  • Fixed setIn crashing on undefined state (#535, fixes #909)
  • Fixed inability to register fields with reserved property names like constructor (#520)

TypeScript

  • FormState.values is now correctly typed as non-optional (#502)
  • Fixed return type of submit function in type declarations (#499)
  • Fixed isEqual initialization TypeScript error (#517)
  • Added types field to package.json for better tooling compatibility (#518)
  • blur, change, and focus are now guaranteed to always be functions (#519, fixes #472)

v5.0.0

Choose a tag to compare

@erikras erikras released this 07 Jun 08:46

This release has converted the entire library from Flow to TypeScript.

There should be NO BREAKING CHANGES, but because so much code was touched, I'm bumping to a major version out of precaution.

Read more here: Final Form goes to TypeScript

v5.0.0-3

v5.0.0-3 Pre-release
Pre-release

Choose a tag to compare

@erikras erikras released this 25 May 13:18
  • Better support for useSyncExternalStore (#498) e5cad94

v5.0.0-2...v5.0.0-3

v5.0.0-1

v5.0.0-1 Pre-release
Pre-release

Choose a tag to compare

@erikras erikras released this 25 May 10:54

v5.0.0-0

v5.0.0-0 Pre-release
Pre-release

Choose a tag to compare

@erikras erikras released this 25 May 06:56

v4.20.10...v5.0.0-0

v4.20.10

Choose a tag to compare

@erikras erikras released this 11 Aug 09:44
  • Merge pull request #475 from xxleyi/add-async-validating-test 16923ad
  • test: async validating 1367ca0
  • Merge pull request #473 from xxleyi/fix-async-validating d20c44b
  • Merge pull request #470 from final-form/dependabot/npm_and_yarn/axios-and-github-build-0.21.4 f5fa420
  • fix: async validating 72c9d73

v4.20.9...v4.20.10

v4.20.9

Choose a tag to compare

@erikras erikras released this 23 Jan 11:50

v4.20.8...v4.20.9

v4.20.8

Choose a tag to compare

@erikras erikras released this 11 Jan 14:09
  • Merge pull request #461 from antonvialibri1/fix-for-array-checkboxes-inputs-after-regression-introduced-in-version-4.20.3 b905214
  • Merge pull request #446 from final-form/dependabot/npm_and_yarn/follow-redirects-1.14.8 24bc8b3
  • Merge pull request #452 from final-form/dependabot/npm_and_yarn/minimist-1.2.6 b084b4b
  • Merge pull request #454 from final-form/dependabot/npm_and_yarn/simple-get-3.1.1 0499149
  • Merge pull request #466 from final-form/dependabot/npm_and_yarn/decode-uri-component-0.2.2 ec23212
  • Merge pull request #468 from final-form/dependabot/npm_and_yarn/json5-1.0.2 a5063e4
  • Merge branch 'huan086-feature/fix-up-field-state' 3b49609
  • Merge branch 'feature/fix-up-field-state' of github.com:huan086/final-form into huan086-feature/fix-up-field-state b666d1c
  • Bump json5 from 1.0.1 to 1.0.2 fef51c5
  • Bump decode-uri-component from 0.2.0 to 0.2.2 5464d69
  • Fix for issue #456 - Fixes unwanted breaking change for array input names introduced in v4.20.3 (a3575ef) - v4.20.2 used to work fine 3e47a6b
  • Bump simple-get from 3.1.0 to 3.1.1 fba79fa
  • Bump minimist from 1.2.5 to 1.2.6 a75117b
  • Bump follow-redirects from 1.14.4 to 1.14.8 6ace61a
  • If mutator creates a new field in MutableState for keeping the field state of a renamed field, set the blur, focus and change function of InternalFieldState when registerField is called. 33e551f

v4.20.7...v4.20.8

v4.20.7

Choose a tag to compare

@erikras erikras released this 27 Apr 08:34
  • Make allValues argument optional on type FieldValidator (#394)
  • Prevent formState.values from initializing to undefined (#450)

v4.20.6...v4.20.7

v4.20.6

Choose a tag to compare

@erikras erikras released this 06 Dec 11:18

Bug Fixes

  • Better fix for async error bug #441

v4.20.5...v4.20.6