Skip to content

Commit

Permalink
fix last row
Browse files Browse the repository at this point in the history
  • Loading branch information
dtassone committed Feb 22, 2021
1 parent 3e5f613 commit ecb5947
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ export const useGridContainerProps = (
(options.autoPageSize ? 1 : rowsCount / viewportPageSize) * viewportSizes.height +
(scrollState.hasScrollY ? scrollState.scrollBarSize.x : 0);

// make sure the last row fit well due to rounding
totalHeight += totalHeight % rowHeight;

if (options.autoHeight) {
totalHeight = rowsCount * rowHeight + scrollState.scrollBarSize.x;
}
Expand Down

0 comments on commit ecb5947

Please sign in to comment.