Skip to content

Commit bf0a036

Browse files
committed
fix(RowSelection): select all correctly when there is row pinning &groupBy #7600
1 parent cff0c61 commit bf0a036

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

projects/igniteui-angular/src/lib/grids/selection/selection.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,12 @@ export class IgxGridSelectionService {
729729

730730
/** Returns all data in the grid, with applied filtering and sorting and without deleted rows. */
731731
public get allData(): Array<any> {
732-
const allData = this.isFilteringApplied() || this.grid.sortingExpressions.length ?
733-
this.grid.filteredSortedData : this.grid.gridAPI.get_all_data(true);
732+
let allData;
733+
if (this.isFilteringApplied() || this.grid.sortingExpressions.length) {
734+
allData = this.grid.pinnedRecordsCount ? this.grid._filteredSortedUnpinnedData : this.grid.filteredSortedData;
735+
} else {
736+
allData = this.grid.gridAPI.get_all_data(true);
737+
}
734738
return allData.filter(rData => !this.isRowDeleted(this.grid.gridAPI.get_row_id(rData)));
735739
}
736740

src/app/grid-row-pinning/grid-row-pinning.sample.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</div>
2121
<igx-grid [rowEditable]="true" [igxGridState]="options" [allowFiltering]='true' [primaryKey]='"ID"' [pinning]="pinningConfig" [paging]="true"
2222
[columnHiding]='true' [showToolbar]='true' [columnPinning]='true' #grid1 [data]="data" [width]="'800px'"
23-
[height]="'600px'" [rowSelection]="true">
23+
[height]="'600px'" [rowSelection]="'multiple'">
2424

2525
<ng-template igxGridDetail let-dataItem>
2626
<div>

0 commit comments

Comments
 (0)