From e23fd69d323f3654893a5ba1b00278d466a86f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:34:12 +0300 Subject: [PATCH] Fixed #15233 | Refactor condition for outsideClick --- src/app/components/table/table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 346db11b307..9d08e9b4e86 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -5612,6 +5612,7 @@ export class ColumnFilter implements AfterContentInit { isOutsideClicked(event: any): boolean { return !( + DomHandler.hasClass(this.overlay?.nextElementSibling, 'p-overlay') || this.overlay?.isSameNode(event.target) || this.overlay?.contains(event.target) || this.icon?.nativeElement.isSameNode(event.target) || @@ -5630,7 +5631,6 @@ export class ColumnFilter implements AfterContentInit { this.documentClickListener = this.renderer.listen(documentTarget, 'mousedown', (event) => { const dialogElements = document.querySelectorAll('[role="dialog"]'); const targetIsColumnFilterMenuButton = event.target.closest('.p-column-filter-menu-button'); - if (this.overlayVisible && this.isOutsideClicked(event) && (targetIsColumnFilterMenuButton || dialogElements?.length <= 1)) { this.hide(); }