Skip to content

Commit

Permalink
fix(context menu): emit destroy when component got destroyed (akveo#2767
Browse files Browse the repository at this point in the history
)
  • Loading branch information
andreipadolin authored Jun 27, 2021
1 parent 5e74916 commit 5036b89
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
OnChanges,
OnDestroy,
OnInit,
SimpleChanges,
} from '@angular/core';
import { filter, takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';
Expand Down Expand Up @@ -250,6 +249,8 @@ export class NbContextMenuDirective implements NbDynamicOverlayController, OnCha

ngOnDestroy() {
this.dynamicOverlayHandler.destroy();
this.destroy$.next();
this.destroy$.complete();
}

protected configureDynamicOverlay() {
Expand Down

0 comments on commit 5036b89

Please sign in to comment.