Skip to content

v3.0.1

Compare
Choose a tag to compare
@maxime1992 maxime1992 released this 07 Nov 14:36
· 178 commits to master since this release
1956d25

3.0.1 (2019-11-07)

This release should be 3.0.0 but an issue happened and the 3.0.0 couldn't be published.
Here are the notes for 3.0.0 (and the empty 3.0.1):

Features

  • lib: possibility to define default values and reset a form using those + possibility to set a formControl to null
  • lib: handle default values with transformToFormGroup

BREAKING CHANGES

transformToFormGroup can now receive a null value.
It also has a new param "defaultValues" which is a Partial of the form interface.
This gives finer control on the behavior when a null value is passed to a sub form and let you implement what you want. Indeed in some cases you may still display a sub form even if it's value is null, in that case, you then have the choice to reset the formGroup to default values, or set all of them to null. From transformToFormGroup, if you return null all the properties of the form will be reset to null, otherwise return an object representing all the values.