fix(forms): emit value changes after errors and status are set

Closes #4714
This commit is contained in:
vsavkin
2015-10-13 18:27:30 -07:00
committed by Victor Savkin
parent 6436f96fd1
commit b716d2335b
2 changed files with 18 additions and 4 deletions

View File

@ -107,13 +107,13 @@ export class AbstractControl {
this._updateValue();
this._errors = this.validator(this);
this._status = isPresent(this._errors) ? INVALID : VALID;
if (emitEvent) {
ObservableWrapper.callNext(this._valueChanges, this._value);
}
this._errors = this.validator(this);
this._status = isPresent(this._errors) ? INVALID : VALID;
if (isPresent(this._parent) && !onlySelf) {
this._parent.updateValueAndValidity({onlySelf: onlySelf, emitEvent: emitEvent});
}