Skip to content

Commit

Permalink
Merge pull request #14964 from ymg2006/master
Browse files Browse the repository at this point in the history
fixes #14962 - ContextMenu | onHide, onShow event is not being triggered when you right click twice continuously
  • Loading branch information
cetincakiroglu authored Mar 19, 2024
2 parents 82ea1c3 + c98a476 commit 38dd93a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/components/contextmenu/contextmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,6 @@ export class ContextMenu implements OnInit, AfterContentInit, OnDestroy {
this.moveOnTop();
this.appendOverlay();
this.bindGlobalListeners();
this.onShow.emit();
DomHandler.focus(this.rootmenu.sublistViewChild.nativeElement);
break;
}
Expand Down Expand Up @@ -970,7 +969,6 @@ export class ContextMenu implements OnInit, AfterContentInit, OnDestroy {
}

this.container = null;
this.onHide.emit();
}

onTouchStart(event: MouseEvent) {
Expand All @@ -985,6 +983,7 @@ export class ContextMenu implements OnInit, AfterContentInit, OnDestroy {

hide() {
this.visible.set(false);
this.onHide.emit();
this.activeItemPath.set([]);
this.focusedItemInfo.set({ index: -1, level: 0, parentKey: '', item: null });
}
Expand All @@ -1000,6 +999,7 @@ export class ContextMenu implements OnInit, AfterContentInit, OnDestroy {
this.pageX = event.pageX;
this.pageY = event.pageY;

this.onShow.emit();
this.visible() ? this.position() : this.visible.set(true);

event.stopPropagation();
Expand Down
4 changes: 3 additions & 1 deletion src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5455,7 +5455,9 @@ export class ColumnFilter implements AfterContentInit {

removeConstraint(filterMeta: FilterMetadata) {
this.dt.filters[<string>this.field] = (<FilterMetadata[]>this.dt.filters[<string>this.field]).filter((meta) => meta !== filterMeta);
this.dt._filter();
if (!this.showApplyButton) {
this.dt._filter();
}
DomHandler.focus(this.clearButtonViewChild.nativeElement);
}

Expand Down

0 comments on commit 38dd93a

Please sign in to comment.