Skip to content

Commit

Permalink
Merge pull request #15280 from primefaces/issue-15233
Browse files Browse the repository at this point in the history
Fixed #15233 - Dropdown | Dropdown in Table Filter Menu Fails to Appl…
  • Loading branch information
cetincakiroglu authored Apr 18, 2024
2 parents c4163b7 + b2f2549 commit c7206ea
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5631,9 +5631,13 @@ export class ColumnFilter implements AfterContentInit {
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();
}
dialogElements.forEach((dialogElement) => {
const appendToBodyExists = dialogElement.querySelector('[appendto="body"]') !== null

if (this.overlayVisible && this.isOutsideClicked(event) && !appendToBodyExists && (targetIsColumnFilterMenuButton || dialogElements?.length <= 1)) {
this.hide();
}
});

this.selfClick = false;
});
Expand Down

0 comments on commit c7206ea

Please sign in to comment.