angular-cn/packages/forms/test
Artem Lanovyy 1df3aefb81 fix(forms): mark form as pristine before emitting value and status change events (#28395)
BREAKING CHANGE

Previous to this change, when a control was reset, value and status change
events would be emitted before the control was reset to pristine. As a
result, if one were to check a control's pristine state in a valueChange
listener, it would appear that the control was still dirty after reset.

This change delays emission of value and status change events until after
controls have been marked pristine. This means the pristine state will be
reset as expected if one checks in a listener.

Theoretically, there could be applications depending on checking whether a
control *used to be dirty*, so this is marked as breaking. In these cases,
apps should cache the state on the app side before calling reset.

Fixes #28130

PR Close #28395
2019-02-13 19:17:35 -08:00
..
BUILD.bazel test(ivy): run forms tests with ivy on ci (#26968) 2018-11-06 15:09:35 -08:00
directives_spec.ts build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
form_array_spec.ts fix(forms): mark form as pristine before emitting value and status change events (#28395) 2019-02-13 19:17:35 -08:00
form_builder_spec.ts feat(forms): add updateOn option to FormBuilder (#24599) 2018-11-01 15:31:11 -07:00
form_control_spec.ts fix(forms): don't override form group's dirty state when disabling controls (#24591) 2019-01-25 12:59:07 -08:00
form_group_spec.ts fix(forms): mark form as pristine before emitting value and status change events (#28395) 2019-02-13 19:17:35 -08:00
reactive_integration_spec.ts fix(ivy): hack implementation of host styles (#27180) 2018-11-20 11:43:29 -08:00
spies.ts fix(forms): improve error message for invalid value accessors (#22731) 2018-04-04 08:20:55 -07:00
template_integration_spec.ts fix(ivy): hack implementation of host styles (#27180) 2018-11-20 11:43:29 -08:00
validators_spec.ts Revert "test(forms): add test on applying unicode flag (#20819)" (#27375) 2018-11-30 10:49:27 -08:00
value_accessor_integration_spec.ts fix(ivy): hack implementation of host styles (#27180) 2018-11-20 11:43:29 -08:00