From 76efed7fad71658533996e4b3c497dbab292c69e Mon Sep 17 00:00:00 2001 From: Damyan Petev Date: Fri, 12 Nov 2021 14:34:42 +0200 Subject: [PATCH] perf(grid): groupBy selection getter filter w/ set instead of array --- .../src/lib/grids/grid/groupby-row.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/src/lib/grids/grid/groupby-row.component.ts b/projects/igniteui-angular/src/lib/grids/grid/groupby-row.component.ts index 473fe5bbbc6..35b99b4e115 100644 --- a/projects/igniteui-angular/src/lib/grids/grid/groupby-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/grid/groupby-row.component.ts @@ -278,8 +278,8 @@ export class IgxGridGroupByRowComponent implements OnDestroy { * @hidden @internal */ public get selectedRowsInTheGroup(): any[] { - const selectedIds = this.gridSelection.filteredSelectedRowIds; - return this.groupRow.records.filter(rowID => selectedIds.indexOf(this.getRowID(rowID)) > -1); + const selectedIds = new Set(this.gridSelection.filteredSelectedRowIds); + return this.groupRow.records.filter(rowID => selectedIds.has(this.getRowID(rowID))); } /**