1 changed file
projects/igniteui-angular-extras/src/lib/context-menu | ||
igx-context-menu.directive.ts | ||
igx-context-menu.directive.ts
/projects/igniteui-angular-extras/src/lib/context-menu/igx-context-menu.directive.ts-2+10/projects/igniteui-angular-extras/src/lib/context-menu/igx-context-menu.directive.ts
Add comment 1 Minus import { AfterViewInit, Directive, EventEmitter, Optional, Output, OnInit } from '@angular/core';
Add comment 1 Plus import { AfterViewInit, Directive, EventEmitter, Optional, Output, OnInit, OnDestroy } from '@angular/core';
Add comment 2 import { AbsoluteScrollStrategy, AutoPositionStrategy, HorizontalAlignment, IgxGridComponent,
Add comment 3 IgxOverlayService, OverlayCancelableEventArgs, VerticalAlignment, OverlaySettings } from '@infragistics/igniteui-angular';
Add comment 4 import { Subject } from 'rxjs';
Add comment 11 @Directive({
Add comment 12 selector: '[igxContextMenu]'
Add comment 13 })
Add comment 14 Minus export class IgxContextMenuDirective implements OnInit, AfterViewInit {
Add comment 14 Plus export class IgxContextMenuDirective implements OnInit, AfterViewInit, OnDestroy {
Add comment 15
Add comment 16 @Output() public onButtonClose = new EventEmitter<any>();
Add comment 17
Add comment 60 });
Add comment 61 }
Add comment 62
Add comment 63 Plus public ngOnDestroy(): void {
Add comment 64 Plus this.destroy$.next(true);
Add comment 65 Plus this.destroy$.complete();
Add comment 66 Plus if (!this._collapsed) {
Add comment 67 Plus this.close();
Add comment 68 Plus }
Add comment 69 Plus }
Add comment 70 Plus
Add comment 63 71 private setUpGridListeners() {
Add comment 64 72 this.contentObserver = new ResizeObserver(() => this.gridResizeNotify.next());
Add comment 65 73 this.contentObserver.observe(this.grid.nativeElement);