angular/packages/forms/test
Dylan Hunn 72092ebd26 feat(forms): Allow a FormControl to use initial value as default. (#44434)
Allow a FormControl to be reset to its initial value. Provide this feature via a new option in a FormControlOptions interface, based on AbstractControlOptions.

Also, expose the default value as part of the public API. This is part of a feature that has been requested elsewhere (e.g. in #19747).

This was originally proposed as part of typed forms. As discussed in the GDE session (and after with akushnir/alxhub), it is likely better to just reuse the initial value rather than accepting an additional default.

It is desirable to land this separately in order to reduce the scope of the typed forms PR, and make it a types-only change.

Pertains to issue #13721.

PR Close #44434
2021-12-15 10:36:13 -05:00
..
BUILD.bazel ci: remove saucelabs view engine tests (#43862) 2021-10-19 10:06:55 -07:00
directives_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
form_array_spec.ts refactor(forms): Make the minimum changes to the forms unit tests in order to support the typed forms PR (#43834). (#44451) 2021-12-14 16:10:08 -05:00
form_builder_spec.ts test(forms): Add more tests for FormBuilder method argument shapes. (#44452) 2021-12-14 16:11:29 -05:00
form_control_spec.ts feat(forms): Allow a FormControl to use initial value as default. (#44434) 2021-12-15 10:36:13 -05:00
form_group_spec.ts refactor(forms): Make the minimum changes to the forms unit tests in order to support the typed forms PR (#43834). (#44451) 2021-12-14 16:10:08 -05:00
reactive_integration_spec.ts refactor(forms): Make the minimum changes to the forms unit tests in order to support the typed forms PR (#43834). (#44451) 2021-12-14 16:10:08 -05:00
template_integration_spec.ts feat(forms): allow disabling min/max validators dynamically (by setting the value to null) (#42978) 2021-09-24 10:35:31 -07:00
util.ts refactor(forms): refactor common validators used in unit tests (#38020) 2020-07-22 20:42:43 -07:00
validators_spec.ts feat(core): support TypeScript 4.3 (#42022) 2021-06-04 11:17:09 -07:00
value_accessor_integration_spec.ts refactor(forms): Make the minimum changes to the forms unit tests in order to support the typed forms PR (#43834). (#44451) 2021-12-14 16:10:08 -05:00