MCPcopy Create free account
hub / github.com/bvaughn/react-virtualized / TableMethodsRoute

Function TableMethodsRoute

src/routes/table/TableMethodsRoute.tsx:14–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12import { TableImperativeMethods } from "./examples/TableImperativeMethods";
13
14export default function TableMethodsRoute() {
15 return (
16 <Box direction="column" gap={4}>
17 <ImperativeHandle
18 json={{ ...(json as ImperativeHandleMetadata), name: "Table methods" }}
19 section="Table"
20 />
21 <SectionHeader>Calling methods</SectionHeader>
22 <div>
23 <code>Table</code>&apos;s methods can be called through a{" "}
24 <code>ref</code>. The example below uses <code>scrollToRow</code> (with
25 an <code>align</code> parameter) and <code>scrollToPosition</code>. As
26 with <Link to="/list/scroll-to-row">List</Link>, these are one-time
27 scrolls (the row isn&apos;t kept in view if the table&apos;s size or row
28 heights change afterwards). In version 10, these methods replace the{" "}
29 <code>scrollToIndex</code>, <code>scrollToAlignment</code> and{" "}
30 <code>scrollTop</code> props.
31 </div>
32 <Block className="p-2" data-focus-within="bold">
33 <TableImperativeMethods />
34 </Block>
35 <Code html={TableImperativeMethodsJson.html} />
36 </Box>
37 );
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected