Skip to content

Commit

Permalink
fix rows per page calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlln committed Feb 7, 2025
1 parent 101a8bd commit fbece99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/grid/src/GridMetricCalculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,9 @@ export class GridMetricCalculator {
let columnWidth = 0;

const fontWidth = this.getWidthForFont(font, state);
const rowsPerPage = height / rowHeight;

const gridY = this.getGridY(state);
const rowsPerPage = Math.floor((height - gridY) / rowHeight);
const bottom = Math.ceil(top + rowsPerPage);
GridUtils.iterateAllItems(
top,
Expand Down

0 comments on commit fbece99

Please sign in to comment.