Skip to content

Commit

Permalink
use the new row height (28)
Browse files Browse the repository at this point in the history
  • Loading branch information
ersin-erdal committed Jan 10, 2022
1 parent 9737d1f commit d015c4c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { useState, useLayoutEffect } from 'react';
// rowHeight * pageSize + (filtersHeight + headerHeight + paginationHeight + 1)
// +1 is for useLayoutEffect to detect the change
const DATA_GRID_HEIGHT_BY_PAGE_SIZE: { [key: number]: number } = {
10: 449,
25: 959,
50: 1809,
100: 3509,
10: 389,
25: 809,
50: 1509,
100: 2909,
};

/**
Expand All @@ -30,7 +30,7 @@ const DATA_GRID_HEIGHT_BY_PAGE_SIZE: { [key: number]: number } = {
const filtersHeight = 32;
const headerHeight = 40;
const paginationHeight = 36;
const rowHeight = 34;
const rowHeight = 28;

export const useDataGridHeightHack = (pageSize: number, rowCount: number) => {
const [height, setHeight] = useState(DATA_GRID_HEIGHT_BY_PAGE_SIZE[pageSize]);
Expand Down

0 comments on commit d015c4c

Please sign in to comment.