MCPcopy Index your code
hub / github.com/TanStack/table / App

Function App

examples/react/material-ui-pagination/src/main.tsx:30–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28import { makeData, Person } from './makeData'
29
30function App() {
31 const rerender = React.useReducer(() => ({}), {})[1]
32
33 const columns = React.useMemo<ColumnDef<Person>[]>(
34 () => [
35 {
36 header: 'Name',
37 footer: (props) => props.column.id,
38 columns: [
39 {
40 accessorKey: 'firstName',
41 cell: (info) => info.getValue(),
42 footer: (props) => props.column.id,
43 },
44 {
45 accessorFn: (row) => row.lastName,
46 id: 'lastName',
47 cell: (info) => info.getValue(),
48 header: () => <span>Last Name</span>,
49 footer: (props) => props.column.id,
50 },
51 ],
52 },
53 {
54 header: 'Info',
55 footer: (props) => props.column.id,
56 columns: [
57 {
58 accessorKey: 'age',
59 header: () => 'Age',
60 footer: (props) => props.column.id,
61 },
62 {
63 header: 'More Info',
64 columns: [
65 {
66 accessorKey: 'visits',
67 header: () => <span>Visits</span>,
68 footer: (props) => props.column.id,
69 },
70 {
71 accessorKey: 'status',
72 header: 'Status',
73 footer: (props) => props.column.id,
74 },
75 {
76 accessorKey: 'progress',
77 header: 'Profile Progress',
78 footer: (props) => props.column.id,
79 },
80 ],
81 },
82 ],
83 },
84 ],
85 [],
86 )
87

Callers

nothing calls this directly

Calls 3

makeDataFunction · 0.90
refreshDataFunction · 0.70
rerenderFunction · 0.50

Tested by

no test coverage detected