Releases: migtools/lib-ui
Releases · migtools/lib-ui
v5.1.0
v5.0.0
5.0.0 (2021-06-24)
Features
- useformstate: replace setInitialValue/reset with prefill/revert and reinitialize/clear (#65) (5dd826e)
BREAKING CHANGES
-
useformstate:
setInitialValue
andreset
have been replaced withreinitialize
andclear
. For betterisDirty
behavior you may want to useprefill
instead ofreinitialize
. -
Simplify sentence about revert/clear
v4.0.4
v4.0.3
v4.0.2
v4.0.1
v4.0.0
4.0.0 (2021-04-22)
Bug Fixes
- useformstate: hotfix: we needed AnySchema instead of SchemaOf for the yup breaking change (#59) (a1e3601)
BREAKING CHANGES
- useformstate: useFormState and useFormField now require
yup.AnySchema<T>
schema types instead
of theyup.SchemaOf<T>
which was not behaving correctly with boolean fields.
v3.0.0
3.0.0 (2021-04-22)
Build System
BREAKING CHANGES
- deps: The yup upgrade bundles its own TS types, removing the need to depend on
@types/yup
, and some of the type changes are breaking.yup.Schema
has been replaced byyup.SchemaOf
, and it correctly infers array types now so we were able to remove the hackyMaybeArraySchema
type from useFormState. There have also been some behavior changes in some of the schema methods, particularly the.defined()
and.required()
methods. See those changes here: https://github.com/jquense/yup/blob/master/CHANGELOG.md (the items between 0.29.3 and 0.32.8). We felt it was a good idea to upgrade even though this is a little disruptive, because the new built-in TS types are less finicky and more helpful than the community-provided ones were.