MCPcopy
hub / github.com/Comcast/react-data-grid / setupGrid

Function setupGrid

test/browser/rowHeight.test.ts:8–21  ·  view source on GitHub ↗
(rowHeight: DataGridProps<Row>['rowHeight'])

Source from the content-addressed store, hash-verified

6type Row = number;
7
8function setupGrid(rowHeight: DataGridProps<Row>['rowHeight']) {
9 const columns: Column<Row>[] = [];
10 const rows: readonly Row[] = Array.from({ length: 50 }, (_, i) => i);
11
12 for (let i = 0; i < 5; i++) {
13 const key = String(i);
14 columns.push({
15 key,
16 name: key,
17 width: 80
18 });
19 }
20 return setup({ columns, rows, rowHeight }, true);
21}
22
23async function expectGridRows(rowHeightFn: (row: number) => number, expected: string) {
24 await setupGrid(rowHeightFn);

Callers 2

expectGridRowsFunction · 0.70
rowHeight.test.tsFile · 0.70

Calls 1

setupFunction · 0.90

Tested by

no test coverage detected