fix(forms): set state before emitting a value from ngModelChange (#21514)
Closes #21513. PR Close #21514
This commit is contained in:

committed by
Victor Berchet

parent
a7ebf5aadd
commit
3e6a86fb0a
@ -99,9 +99,9 @@ function setUpBlurPipeline(control: FormControl, dir: NgControl): void {
|
||||
}
|
||||
|
||||
function updateControl(control: FormControl, dir: NgControl): void {
|
||||
dir.viewToModelUpdate(control._pendingValue);
|
||||
if (control._pendingDirty) control.markAsDirty();
|
||||
control.setValue(control._pendingValue, {emitModelToViewChange: false});
|
||||
dir.viewToModelUpdate(control._pendingValue);
|
||||
control._pendingChange = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user