TanStack

table_getCellSelectionColumnIndexes

Function: table_getCellSelectionColumnIndexes()

ts
function table_getCellSelectionColumnIndexes<TFeatures, TData>(table): Record<string, number>;

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

Builds a column id to render-order index map.

Registered by this feature so the lookup stays memoized even when columnOrderingFeature is absent, since that feature's getColumnIndexes static rebuilds all four maps on every call, which would make per-cell reads O(columns).

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

Record<string, number>

Example

ts
const index = table_getCellSelectionColumnIndexes(table)[columnId]