Skip to content

Commit

Permalink
Merge pull request #135 from Humberd/master
Browse files Browse the repository at this point in the history
Editor formControl now properly propagates changes #134
  • Loading branch information
atu1kr committed Nov 10, 2019
2 parents 310705e + 0f0404a commit 5b6fbde
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions projects/editor/src/lib/editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ export class EditorComponent extends BaseEditor implements ControlValueAccessor

this._editor.onDidChangeModelContent((e: any) => {
const value = this._editor.getValue();
this.propagateChange(value);

// value is not propagated to parent when executing outside zone.
this.zone.run(() => this._value = value);
this.zone.run(() => {
this.propagateChange(value);
this._value = value;
});
});

this._editor.onDidBlurEditorWidget(() => {
Expand Down

0 comments on commit 5b6fbde

Please sign in to comment.