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

Function getTableMeta

examples/react/kitchen-sink/src/tableModels.tsx:158–177  ·  view source on GitHub ↗
(
  setData: React.Dispatch<React.SetStateAction<Person[]>>,
  skipAutoResetPageIndex: () => void
)

Source from the content-addressed store, hash-verified

156]
157
158export const getTableMeta = (
159 setData: React.Dispatch<React.SetStateAction<Person[]>>,
160 skipAutoResetPageIndex: () => void
161) =>
162 ({
163 updateData: (rowIndex, columnId, value) => {
164 // Skip age index reset until after next rerender
165 skipAutoResetPageIndex()
166 setData(old =>
167 old.map((row, index) => {
168 if (index !== rowIndex) return row
169
170 return {
171 ...old[rowIndex]!,
172 [columnId]: value,
173 }
174 })
175 )
176 },
177 }) as TableMeta

Callers 1

AppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…