TanStack

table_getCellSpanIndex

Function: table_getCellSpanIndex()

ts
function table_getCellSpanIndex<TFeatures, TData>(table): CellSpanIndex<TFeatures, TData>;

Defined in: features/cell-spanning/cellSpanningFeature.utils.ts:150

Builds the table's cell span index for the rows that are currently rendered.

Spans are always derived from scratch from the final row model, so sorting, filtering, pagination, expansion, and row pinning only change adjacency and the index follows. Nothing is persisted and there is nothing to configure.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

CellSpanIndex<TFeatures, TData>

Example

ts
const spanIndex = table_getCellSpanIndex(table)