TanStack

makeStateUpdater

Function: makeStateUpdater()

ts
function makeStateUpdater<TFeatures, K>(key, instance): (updater) => void;

Defined in: utils.ts:97

Creates a table state updater for a single state slice.

The updater writes through the table base atom for the slice and supports both value and functional updater forms.

Type Parameters

TFeatures

TFeatures extends TableFeatures

K

K extends string | number | symbol | string & object

Parameters

key

K

instance

baseAtoms

object

options

{ atoms?: object; }

options.atoms?

object

Returns

ts
(updater): void;

Parameters

updater

Updater<TableState_WorkerRowModels & TableState_ColumnFiltering & TableState_ColumnGrouping & TableState_RowExpanding & TableState_RowPagination & TableState_RowSorting & TableState_ColumnPinning & TableState_ColumnSizing & TableState_ColumnResizing & TableState_GlobalFiltering & TableState_ColumnOrdering & TableState_ColumnVisibility & TableState_RowPinning & TableState_RowSelection & TableState_CellSelection[K & | "expanded" | "columnFilters" | "globalFilter" | "grouping" | "sorting" | "cellSelection" | "columnOrder" | "columnPinning" | "columnResizing" | "columnSizing" | "columnVisibility" | "pagination" | "rowPinning" | "rowSelection" | "workerRowModels"]>

Returns

void