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

Function App

examples/react/pagination-controlled/src/main.tsx:27–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

fetchDataFunction · 0.90
useReactTableFunction · 0.90
flexRenderFunction · 0.90
getCoreRowModelFunction · 0.85
getContextMethod · 0.80
previousPageMethod · 0.80
nextPageMethod · 0.80
rerenderFunction · 0.50

Tested by

no test coverage detected