Skip to content

Commit 9f1ffd0

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Fix more indexes due to row pinning.
1 parent c071635 commit 9f1ffd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/igniteui-angular/src/lib/grids/row.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,8 @@ export class IgxRowDirective implements DoCheck, AfterViewInit, OnDestroy {
626626
const mergeMeta = this.metaData?.cellMergeMeta;
627627
const rowCount = mergeMeta?.get(col.field)?.rowSpan;
628628
if (mergeMeta && rowCount > 1) {
629-
const isPinned = this.pinned && this.disabled;
630-
const indexInData = isPinned && this.grid.isRowPinningToTop ? this.index - this.grid.pinnedRecordsCount : this.index;
629+
const isPinned = this.pinned && !this.disabled;
630+
const indexInData = this.grid.isRowPinningToTop && !isPinned ? this.index - this.grid.pinnedRecordsCount : this.index;
631631
const range = this.grid.verticalScrollContainer.igxForOf.slice(indexInData, indexInData + rowCount);
632632
const inRange = range.filter(x => this.selectionService.isRowSelected(this.grid.primaryKey ? (x.recordRef || x)[this.grid.primaryKey] : (x.recordRef || x))).length > 0;
633633
return inRange;

0 commit comments

Comments
 (0)