Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix review
Browse files Browse the repository at this point in the history
pomahtri committed Sep 8, 2023
1 parent 01043b9 commit 6c69ab2
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1740,12 +1740,10 @@ export class KeyboardNavigationController extends modules.ViewController {
return rowIndex >= (dataController as any).getMaxRowIndex();
}

let lastVisibleIndex = -1;
dataController.items().forEach((item, i) => {
if (item.visible !== false) {
lastVisibleIndex = i;
}
});
const lastVisibleIndex = Math.max(
...dataController.items()
.map((item, index) => (item.visible ? index : -1)),
);

return rowIndex === lastVisibleIndex;
}

0 comments on commit 6c69ab2

Please sign in to comment.