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

Function makeStateUpdater

packages/table-core/src/utils.ts:91–103  ·  view source on GitHub ↗
(
  key: K,
  instance: unknown
)

Source from the content-addressed store, hash-verified

89}
90
91export function makeStateUpdater<K extends keyof TableState>(
92 key: K,
93 instance: unknown
94) {
95 return (updater: Updater<TableState[K]>) => {
96 ;(instance as any).setState(<TTableState>(old: TTableState) => {
97 return {
98 ...old,
99 [key]: functionalUpdate(updater, (old as any)[key]),
100 }
101 })
102 }
103}
104
105type AnyFunction = (...args: any) => any
106

Callers 13

ColumnGrouping.tsFile · 0.90
RowExpanding.tsFile · 0.90
GlobalFiltering.tsFile · 0.90
ColumnFiltering.tsFile · 0.90
ColumnSizing.tsFile · 0.90
RowSelection.tsFile · 0.90
ColumnOrdering.tsFile · 0.90
RowPinning.tsFile · 0.90
ColumnPinning.tsFile · 0.90
RowSorting.tsFile · 0.90
RowPagination.tsFile · 0.90

Calls 1

functionalUpdateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…