Skip to content

Commit

Permalink
Merge pull request #15808 from rosenthalj/SemiFixAdvanceFilter
Browse files Browse the repository at this point in the history
Fixed #15804 - Advance Filtering is broken (revert PR #15594 changes)
  • Loading branch information
cetincakiroglu authored Jun 13, 2024
2 parents 8088fb9 + b48aaaa commit 85275a9
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 85275a9

Please sign in to comment.