Skip to content

Releases: BearStudio/formiz

v2.4.5

10 Dec 16:33
Compare
Choose a tag to compare

Fixs

  • Issue managing common types as collection item (with field name like collection[index]). Remove this kind of item could cause an issue of lost data
  • Issue with initialValues after a form reset, initialValues were kept even if the data were already reset, so on unmount/re-mount we had those values set another time.

v2.4.3

03 Oct 15:25
Compare
Choose a tag to compare

Fixs

  • useCollection issue with defaultValue on reset : using a useCollection with a defaultValue but no initialValues, reset just clear the collection keys instead of put back defaultValue
  • v2.4.2 introduce an issue with collection defaultValue set, just fix it

v2.4.1

19 Sep 14:47
Compare
Choose a tag to compare

FIX

  • Last release break usage of form.collection(collectionName), just fix it

v2.4.0

19 Sep 13:37
Compare
Choose a tag to compare

Improvements

  • useCollection
    Now collection allows to update his name but keep his keys, that is useful managing nested collections
    #224

  • useField first value and state
    Now the value returned match immediately with the field initial or default value, and then his state too.
    #225

v2.3.1

08 Aug 09:12
Compare
Choose a tag to compare

Fixs

  • Collection's pristine state reset: there was an issue resetting form but not these values ​​(with form.reset({ exclude: ["value"] }) for example), the pristine was not reset

v2.3.0

22 May 15:35
Compare
Choose a tag to compare

Fixs

  • Collections issue with pristine : remove items did not break form's pristine because of removed items could not influence it, now collection have its own pristine state

What does it change?

  • Triggering a collection's method will update the pristine state of the collection, as well as the form's pristine state (in addition to updating the mounted fields managed by this method trigger). You can disable these updates by passing the keepPristine option to the method as true.
  • The collection's methods setKeys, remove, and removeMultiple now accept a second parameter options object with the keepPristine property.

v2.2.3

06 Feb 14:12
Compare
Choose a tag to compare

Fixs

  • useForm internal state was not update when it changed
  • collections were never remove from form collection, even if the useCollection was unmount

v2.2.2

24 Jan 08:37
Compare
Choose a tag to compare

Fixs

  • Replace uniqid dependency by short-unique-id (#215)

v2.2.1

16 Jan 08:03
Compare
Choose a tag to compare

Fixs

  • useCollection:
    • performances issues caused by useless re-renders
    • setKeys not shared collection method

v2.2.0

09 Jan 17:32
Compare
Choose a tag to compare

Features

  • stateSubscription on useForm and useFormContext

Fixs

  • reset options type
  • useCollection methods options missing in type