Skip to content

Commit 16a1b03

Browse files
committed
fix(esf): include only search results
1 parent 48be5d4 commit 16a1b03

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</ng-template>
5050

5151
<div class="igx-excel-filter__filter-results" aria-live="polite" aria-atomic="true">
52-
{{ esf.grid?.resourceStrings.igx_grid_excel_matches_count.replace('{0}', displayedListData.length) }}
52+
{{ esf.grid?.resourceStrings.igx_grid_excel_matches_count.replace('{0}', matchesCount) }}
5353
</div>
5454
</igx-list>
5555

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit, OnDestroy {
180180
*/
181181
public displayedListData: FilterListItem[] = [];
182182

183+
/**
184+
* @hidden @internal
185+
*/
186+
public matchesCount: number;
187+
183188
/**
184189
* @hidden @internal
185190
*/
@@ -437,6 +442,7 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit, OnDestroy {
437442
}
438443
}
439444
selectAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all;
445+
this.matchesCount = this.displayedListData.length - 1;
440446
this.cdr.detectChanges();
441447

442448
return;
@@ -469,6 +475,12 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit, OnDestroy {
469475
}
470476
}
471477

478+
if (this.displayedListData.length > 2) {
479+
this.matchesCount = this.displayedListData.length - 2;
480+
} else {
481+
this.matchesCount = 0;
482+
}
483+
472484
selectAllBtn.indeterminate = false;
473485
selectAllBtn.isSelected = true;
474486
selectAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all_search_results;

0 commit comments

Comments
 (0)