TanStack

table_autoResetCellSelection

Function: table_autoResetCellSelection()

ts
function table_autoResetCellSelection<TFeatures, TData>(table): void;

Defined in: features/cell-selection/cellSelectionFeature.utils.ts:94

Schedules a cell selection reset after data changes.

Ranges are stored as row and column ids, so without this a data swap would leave a selection pointing at rows that no longer exist, or silently re-select cells whenever new data reuses ids. The reset runs when autoResetAll or autoResetCellSelection allows it, defaulting to on.

Resetting to initialState.cellSelection rather than to empty means the first row-model computation is a no-op, matching table_autoResetExpanded.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

void

Example

ts
table_autoResetCellSelection(table)