()
| 12 | import { TableImperativeMethods } from "./examples/TableImperativeMethods"; |
| 13 | |
| 14 | export 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>'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't kept in view if the table'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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected