Skip to content

Commit 0fa57bf

Browse files
committed
fix(esf): include only search results
1 parent dd1c96e commit 0fa57bf

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
@@ -165,6 +165,11 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit, OnDestroy {
165165
*/
166166
public displayedListData: FilterListItem[] = [];
167167

168+
/**
169+
* @hidden @internal
170+
*/
171+
public matchesCount: number;
172+
168173
/**
169174
* @hidden @internal
170175
*/
@@ -422,6 +427,7 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit, OnDestroy {
422427
}
423428
}
424429
selectAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all;
430+
this.matchesCount = this.displayedListData.length - 1;
425431
this.cdr.detectChanges();
426432

427433
return;
@@ -454,6 +460,12 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit, OnDestroy {
454460
}
455461
}
456462

463+
if (this.displayedListData.length > 2) {
464+
this.matchesCount = this.displayedListData.length - 2;
465+
} else {
466+
this.matchesCount = 0;
467+
}
468+
457469
selectAllBtn.indeterminate = false;
458470
selectAllBtn.isSelected = true;
459471
selectAllBtn.label = this.esf.grid.resourceStrings.igx_grid_excel_select_all_search_results;

0 commit comments

Comments
 (0)