Skip to content

Commit

Permalink
Merge pull request #11823 from primefaces/issue-11822
Browse files Browse the repository at this point in the history
Fixed #11822 - Table | ColumnFilter overlay not closing after clicked…
  • Loading branch information
cetincakiroglu authored Aug 12, 2022
2 parents 8c8ded3 + 6bef6b8 commit c8770ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4688,7 +4688,6 @@ export class ColumnFilter implements AfterContentInit {
switch (event.toState) {
case 'visible':
this.overlay = event.element;

document.body.appendChild(this.overlay);
ZIndexUtils.set('overlay', this.overlay, this.config.zIndex.overlay);
DomHandler.absolutePosition(this.overlay, this.icon.nativeElement)
Expand Down Expand Up @@ -4810,7 +4809,7 @@ export class ColumnFilter implements AfterContentInit {
if (!this.documentClickListener) {
const documentTarget: any = this.el ? this.el.nativeElement.ownerDocument : 'document';

this.documentClickListener = this.renderer.listen(documentTarget, 'mousedown', event => {
this.documentClickListener = this.renderer.listen(documentTarget, 'click', event => {
if (this.overlayVisible && !this.selfClick && this.isOutsideClicked(event)) {
this.hide();
}
Expand Down

0 comments on commit c8770ee

Please sign in to comment.