TanStack

table_moveCellSelection

Function: table_moveCellSelection()

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

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

Moves the selection one step in a direction, collapsing it to a single cell.

With nothing selected, this selects the first selectable cell so keyboard navigation has somewhere to start.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

direction

CellSelectionDirection

Returns

void

Example

ts
table_moveCellSelection(table, 'down')