Skip to content

Commit

Permalink
revert changes made by PR primefaces#15594
Browse files Browse the repository at this point in the history
  • Loading branch information
rosenthalj committed Jun 7, 2024
1 parent d4d2d33 commit b48aaaa
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5395,8 +5395,6 @@ export class ColumnFilter implements AfterContentInit {

overlayId: any;

applyHasBeenClicked: boolean = false;

get fieldConstraints(): FilterMetadata[] | undefined | null {
return this.dt.filters ? <FilterMetadata[]>this.dt.filters[<string>this.field] : null;
}
Expand Down Expand Up @@ -5651,11 +5649,6 @@ export class ColumnFilter implements AfterContentInit {
}

onEscape() {
if (this.hasFilterNotBeenApplied()) {
this.clearFilter();
}
this.applyHasBeenClicked = false;
this.overlayVisible = false;
this.icon?.nativeElement.focus();
}

Expand Down Expand Up @@ -5755,10 +5748,6 @@ export class ColumnFilter implements AfterContentInit {
return false;
}

hasFilterNotBeenApplied(): boolean {
return this.hasFilter() && !this.applyHasBeenClicked;
}

isOutsideClicked(event: any): boolean {
return !(
DomHandler.hasClass(this.overlay?.nextElementSibling, 'p-overlay') ||
Expand Down Expand Up @@ -5833,10 +5822,6 @@ export class ColumnFilter implements AfterContentInit {
}

hide() {
if (this.hasFilterNotBeenApplied()) {
this.clearFilter();
}
this.applyHasBeenClicked = false;
this.overlayVisible = false;
this.cd.markForCheck();
}
Expand All @@ -5849,14 +5834,12 @@ export class ColumnFilter implements AfterContentInit {
}

clearFilter() {
this.applyHasBeenClicked = false;
this.initFieldFilterConstraint();
this.dt._filter();
if (this.hideOnClear) this.hide();
}

applyFilter() {
this.applyHasBeenClicked = true;
this.dt._filter();
this.hide();
}
Expand Down

0 comments on commit b48aaaa

Please sign in to comment.