TanStack

table_getCellSelectionBounds

Function: table_getCellSelectionBounds()

ts
function table_getCellSelectionBounds<TFeatures, TData>(table): CellSelectionBounds[];

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

Resolves the selected ranges into inclusive display-order index rectangles.

This is the single cache every per-cell read goes through, so index lookups happen once per invalidation rather than once per cell. A range whose corners no longer resolve, for example because its anchor row was filtered out, is omitted rather than clamped, so it contributes nothing while remaining in state and returns intact when the filter clears.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

CellSelectionBounds[]

Example

ts
const bounds = table_getCellSelectionBounds(table)