TanStack

cell_getIsSelected

Function: cell_getIsSelected()

ts
function cell_getIsSelected<TFeatures, TData, TValue>(cell): boolean;

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

Checks whether this cell falls inside any selected range.

Deliberately not memoized. Registering this through assignPrototypeAPIs with memoDeps would allocate a memo closure and dependency array per cell, which costs more than the handful of integer comparisons it would save.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

TValue

TValue extends unknown = unknown

Parameters

cell

Cell<TFeatures, TData, TValue>

Returns

boolean

Example

ts
const isSelected = cell_getIsSelected(cell)