Skip to content

Commit 57a04fa

Browse files
committed
chore(*): get row index based on startIndex
1 parent 86bbf54 commit 57a04fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/igniteui-angular/src/lib/grids/grid/grid.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,8 @@ export class IgxGridComponent extends IgxGridBaseDirective implements GridType,
11441144

11451145
if (index < 0 || index >= this.dataView.length) {
11461146
if (index >= this.dataView.length){
1147-
rec = data ?? this.gridAPI.get_row_by_index(index).rowData;
1147+
const virtIndex = index - this.gridAPI.grid.virtualizationState.startIndex;
1148+
rec = data ?? this.dataView[virtIndex];
11481149
}
11491150
}else {
11501151
rec = data ?? this.dataView[index];

0 commit comments

Comments
 (0)