Commit 9d59b7d
committed
fix(forms): ensure to emit
This commit ensures that the `updateValueAndValidity` method takes the
`asyncValidator` into consideration to emit on the `statusChanges` observables.
This is necessary so that any subsequent changes are emitted properly to any
subscribers.
Closes #20424
Closes #14542
BREAKING CHANGE:
Previously if FormControl, FormGroup and FormArray class instances had async validators
defined at initialization time, the status change event was not emitted once async validator
completed. After this change the status event is emitted into the `statusChanges` observable.
If your code relies on the old behavior, you can filter/ignore this additional status change
event.statusChanges on subsequent value update/validations1 parent 80cab26 commit 9d59b7d
2 files changed
Lines changed: 408 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | | - | |
1153 | 1152 | | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
1154 | 1161 | | |
1155 | 1162 | | |
1156 | 1163 | | |
| |||
1403 | 1410 | | |
1404 | 1411 | | |
1405 | 1412 | | |
1406 | | - | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1407 | 1420 | | |
1408 | 1421 | | |
1409 | 1422 | | |
| |||
1823 | 1836 | | |
1824 | 1837 | | |
1825 | 1838 | | |
1826 | | - | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
1827 | 1847 | | |
1828 | 1848 | | |
1829 | 1849 | | |
| |||
0 commit comments