Skip to content

Commit

Permalink
fix(InlineEditor): Fix onFocus event. it did trigger never
Browse files Browse the repository at this point in the history
  • Loading branch information
tonivj5 committed Aug 5, 2017
1 parent b05afb0 commit f95403b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/inline-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export class InlineEditorComponent implements OnInit, AfterContentInit, OnDestro
date: InputDateComponent,
time: InputTimeComponent,
datetime: InputDatetimeComponent,
checkbox: InputCheckboxComponent
checkbox: InputCheckboxComponent,
};

private refreshNGModel: (_: any) => void;
Expand Down Expand Up @@ -418,6 +418,13 @@ export class InlineEditorComponent implements OnInit, AfterContentInit, OnDestro
}),
);

this.subscriptions.onFocusSubcription = this.events.internal.onFocus.subscribe(
({ event, state }: InternalEvent) => this.emit(this.onFocus, {
event,
state: state.getState(),
}),
);

this.subscriptions.onEnterSubscription = this.events.internal.onEnter.subscribe(
({ event, state }: InternalEvent) => {
if (this.config.saveOnEnter) {
Expand Down

0 comments on commit f95403b

Please sign in to comment.