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

@ -409,9 +409,9 @@ export class FormControl extends AbstractControl {
}
reset(value: any = null, {onlySelf}: {onlySelf?: boolean} = {}): void {
this.updateValue(value, {onlySelf: onlySelf});
this.markAsPristine({onlySelf: onlySelf});
this.markAsUntouched({onlySelf: onlySelf});
this.updateValue(value, {onlySelf: onlySelf});
}
/**