Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/primefaces/primeng
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Apr 18, 2024
2 parents 15bb118 + 87b630b commit d3625d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand All @@ -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();
}
Expand Down

0 comments on commit d3625d0

Please sign in to comment.