TanStack

cell_getSelectionExtendHandler

Function: cell_getSelectionExtendHandler()

ts
function cell_getSelectionExtendHandler<TFeatures, TData, TValue>(cell): (_e) => void;

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

Creates a handler that extends the active range to this cell during a drag.

No rAF coalescing is needed here, unlike the resize handler: mouseenter fires once per cell boundary crossed rather than continuously, and deferring it by a frame would only delay the highlight.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

TValue

TValue extends unknown = unknown

Parameters

cell

Cell<TFeatures, TData, TValue>

Returns

ts
(_e): void;

Parameters

_e

unknown

Returns

void

Example

tsx
<td onMouseEnter={cell.getSelectionExtendHandler()} />