Skip to content

Commit

Permalink
Merge pull request #15094 from supersinex/issue-14987
Browse files Browse the repository at this point in the history
Fixed #14987 - Table | Date Filter Closing Unexpectedly
  • Loading branch information
cetincakiroglu authored Mar 20, 2024
2 parents 6c5b868 + b264500 commit 38ecd5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5625,7 +5625,10 @@ export class ColumnFilter implements AfterContentInit {
const documentTarget: any = this.el ? this.el.nativeElement.ownerDocument : 'document';

this.documentClickListener = this.renderer.listen(documentTarget, 'mousedown', (event) => {
if (this.overlayVisible && this.isOutsideClicked(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 38ecd5f

Please sign in to comment.