TanStack

table_getSelectedCellRangesData

Function: table_getSelectedCellRangesData()

ts
function table_getSelectedCellRangesData<TFeatures, TData>(table): unknown[][][];

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

Returns each final positive region's values as a row-major grid.

This is the raw material for clipboard export. Serializing it to text is left to userland, since the delimiter, the null representation, and whether values containing delimiters get quoted are all application decisions.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

unknown[][][]

Example

ts
const [firstRange] = table_getSelectedCellRangesData(table)