Skip to content

Commit 339ba84

Browse files
authored
Merge pull request #5806 from IgniteUI/tzhelev/fix-5805
Select all list items when clearing filter through ESF instead of recreating them - 8.2.x
2 parents fd491ad + ac1e2e0 commit 339ba84

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-search.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit {
4141

4242
public set isLoading(value: boolean) {
4343
this._isLoading = value;
44-
if (!(this._cdr as any).destroyed) {
45-
this._cdr.detectChanges();
44+
if (!(this.cdr as any).destroyed) {
45+
this.cdr.detectChanges();
4646
}
4747
}
4848

@@ -79,7 +79,7 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit {
7979
}
8080
}
8181

82-
constructor(private _cdr: ChangeDetectorRef) { }
82+
constructor(public cdr: ChangeDetectorRef) { }
8383

8484
public ngAfterViewInit() {
8585
this.refreshSize();

projects/igniteui-angular/src/lib/grids/filtering/excel-style/grid.excel-style-filtering.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,14 @@ export class IgxGridExcelStyleFilteringComponent implements OnDestroy, OnInit, A
565565
}
566566
}
567567

568+
private selectAllFilterItems() {
569+
this.listData.forEach(filterListItem => {
570+
filterListItem.isSelected = true;
571+
filterListItem.indeterminate = false;
572+
});
573+
this.excelStyleSearch.cdr.detectChanges();
574+
}
575+
568576
// TODO: sort members by access modifier
569577

570578
get sortingTemplate() {
@@ -681,7 +689,7 @@ export class IgxGridExcelStyleFilteringComponent implements OnDestroy, OnInit, A
681689

682690
public clearFilter() {
683691
this.filteringService.clearFilter(this.column.field);
684-
this.populateColumnData();
692+
this.selectAllFilterItems();
685693
}
686694

687695
public onClearFilterKeyDown(eventArgs) {

0 commit comments

Comments
 (0)