TanStack

cell_getSelectionEdges

Function: cell_getSelectionEdges()

ts
function cell_getSelectionEdges<TFeatures, TData, TValue>(cell): CellSelectionEdges;

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

Returns which sides of this cell sit on the outer boundary of the selection.

A side is an edge when the neighbouring cell in that direction is not itself covered by a range, which is what lets a consumer draw a single outline around an arbitrary union of rectangles.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

TValue

TValue extends unknown = unknown

Parameters

cell

Cell<TFeatures, TData, TValue>

Returns

CellSelectionEdges

Example

ts
const { top, right, bottom, left } = cell_getSelectionEdges(cell)