fix(forms): update dirty before emitting value change (#10362)

Closes #5328
This commit is contained in:
Kara
2016-07-28 14:25:33 -07:00
committed by GitHub
parent a32c4ad2f0
commit 7c76a75452
4 changed files with 112 additions and 2 deletions

View File

@ -45,8 +45,8 @@ export function setUpControl(control: FormControl, dir: NgControl): void {
// view -> model
dir.valueAccessor.registerOnChange((newValue: any) => {
dir.viewToModelUpdate(newValue);
control.updateValue(newValue, {emitModelToViewChange: false});
control.markAsDirty();
control.updateValue(newValue, {emitModelToViewChange: false});
});
control.registerOnChange((newValue: any, emitModelEvent: boolean) => {