MCPcopy Create free account
hub / github.com/bvaughn/react-window / Example

Function Example

src/routes/grid/examples/GridWithWindowScroll.tsx:9–23  ·  view source on GitHub ↗
({ contacts }: { contacts: Contact[] })

Source from the content-addressed store, hash-verified

7import { Grid } from "react-window";
8
9function Example({ contacts }: { contacts: Contact[] }) {
10 return (
11 <Grid
12 cellComponent={CellComponent}
13 cellProps={{ contacts }}
14 columnCount={10}
15 columnWidth={columnWidth}
16 rowCount={contacts.length}
17 rowHeight={25}
18 scrollElement="window"
19 // Columns scroll within the grid unless it is as wide as its content
20 style={{ width: "max-content" }}
21 />
22 );
23}
24
25// <end>
26

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected