Releases: MrWolfZ/ngrx-forms
Releases · MrWolfZ/ngrx-forms
2.3.1
2.3.0
2.2.0
Breaking Changes
- empty groups and arrays are now always enabled instead of disabled and therefore errors can now be set on empty groups and arrays (note that this is only a minor breaking change and only applies in edge cases and therefore this fix is included in a new minor instead of a new major version) (749c1b5), closes #37
Bugfixes
- fix missing union case in typing of
updateArrayupdate function that causes a compile error if used inside anupdateGroup(fa7dccc) - fix
updateGroupthrowing an error if an empty update object was provided in curried as well as uncurried version (bee4d54) - fix
createFormGroupStateproducing results inconsistent with how group states are recomputed from their children after an update (1c62d8c) - fix
createFormArrayStateproducing results inconsistent with how array states are recomputed from their children after an update (70fdc10)
2.1.2
2.1.1
2.1.0
2.0.1
2.0.0 - Evolution
Features
- add support for arrays of form controls (19d4e49)
- add support for asynchronous validation (see the documentation for more details) (f208e61)
- add value converter for object to JSON conversion (2ba37ee) (thanks @tbroadley)
- add support for error composition by extending
validateupdate function to take a single validation function or an array of validation functions (ba976c5) - add
setErrorsupdate function (ee25ca8) - add
resetupdate function (d380e67) - add
updateRecursiveupdate function (see the documentation for a usage example) (31f9d5d) - add common set of validation functions (40308d4)
- add support for user defined properties on form controls and groups (d9778d2)
- introduce concept of
FormViewAdapterand rewrite all control value accessors from scratch as view adapters (see the documentation for more details) - extend example application to contain multiple examples
- added overloads for many update functions that make casting the state unnecessary in certain situations
- added lots of inline comments to the API making it easier to understand what certain functions do right in your IDE
Breaking Changes
- remove support for last keydown code tracking on form controls (this feature has been superseded by user defined properties which allow associating any kind of metadata with a control)
- rename
groupUpdateReducertocreateFormGroupReducerWithUpdatein order to make it clearer that the function itself is not a reducer - remove erroneously exposed function
createChildStatefrom public API - change
optionelementvaluebindings to work correctly for all primitive data types thereby removing the need forngValuebindings - trying to set an error with a key prefixed with
$will now throw an error since the$prefix is used to mark async errors - applying the
ngrxFormControlStatedirective to a form element will now set the element'sidattribute to the ID of the state (thereby overriding any already presentid) - the
isDirtyproperty for form controls is now not set automatically the first time the state's value changes, but instead it is set manually from theNgrxFormControlDirectivethe first time the underlyingFormViewAdapterorControlValueAccessorreports a new value; this means if you were e.g. using thesetValueupdate function in your reducer before this will now not mark the state asdirtyanymore - rename
addControlupdate function toaddGroupControl - rename
AddControlActiontoAddGroupControlAction(also renaming itstypefromngrx/forms/ADD_CONTROLtongrx/forms/ADD_GROUP_CONTROL) - rename
removeControlupdate function toremoveGroupControl - rename
RemoveControlActiontoRemoveGroupControlAction(also renaming itstypefromngrx/forms/REMOVE_CONTROLtongrx/forms/REMOVE_GROUP_CONTROL)
Bugfixes
- fix issue that caused bundled library to be larger than required due to external dependencies being included in the bundle (drastically reducing its size)