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

Function App

examples/react/editable-data/src/main.tsx:70–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70function App() {
71 const rerender = React.useReducer(() => ({}), {})[1]
72
73 const columns = React.useMemo<ColumnDef<Person>[]>(
74 () => [
75 {
76 header: 'Name',
77 footer: props => props.column.id,
78 columns: [
79 {
80 accessorKey: 'firstName',
81 footer: props => props.column.id,
82 },
83 {
84 accessorFn: row => row.lastName,
85 id: 'lastName',
86 header: () => <span>Last Name</span>,
87 footer: props => props.column.id,
88 },
89 ],
90 },
91 {
92 header: 'Info',
93 footer: props => props.column.id,
94 columns: [
95 {
96 accessorKey: 'age',
97 header: () => 'Age',
98 footer: props => props.column.id,
99 },
100 {
101 header: 'More Info',
102 columns: [
103 {
104 accessorKey: 'visits',
105 header: () => <span>Visits</span>,
106 footer: props => props.column.id,
107 },
108 {
109 accessorKey: 'status',
110 header: 'Status',
111 footer: props => props.column.id,
112 },
113 {
114 accessorKey: 'progress',
115 header: 'Profile Progress',
116 footer: props => props.column.id,
117 },
118 ],
119 },
120 ],
121 },
122 ],
123 []
124 )
125
126 const [data, setData] = React.useState(() => makeData(1000))
127 const refreshData = () => setData(() => makeData(1000))

Callers

nothing calls this directly

Calls 12

makeDataFunction · 0.90
useReactTableFunction · 0.90
flexRenderFunction · 0.90
getCoreRowModelFunction · 0.85
getFilteredRowModelFunction · 0.85
getPaginationRowModelFunction · 0.85
getContextMethod · 0.80
previousPageMethod · 0.80
nextPageMethod · 0.80
useSkipperFunction · 0.70
refreshDataFunction · 0.70
rerenderFunction · 0.50

Tested by

no test coverage detected