Skip to content

Commit 7f85ddb

Browse files
authored
Merge pull request #7391 from IgniteUI/nrobakova/fix-issue-7388
Update selection when remote data is used
2 parents abfa67f + 3ae8b9e commit 7f85ddb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/igniteui-angular/src/lib/grids/grid-navigation.service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ export class IgxGridNavigationService {
171171
}
172172

173173
focusTbody(event) {
174-
if (!this.activeNode || this.activeNode.row < 0 || this.activeNode.row > this.grid.dataView.length - 1) {
174+
const gridRows = this.grid.verticalScrollContainer.totalItemCount ?? this.grid.dataView.length;
175+
if (!this.activeNode || this.activeNode.row < 0 || this.activeNode.row > gridRows - 1) {
175176
this.activeNode = { row: 0, column: 0 };
176177
this.grid.navigateTo(0, 0, (obj) => {
177178
this.grid.clearCellSelection();

0 commit comments

Comments
 (0)