Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Table API Reference
Column API Reference
Row API Reference
Cell API Reference
Header API Reference
Features API Reference
Static Functions API Reference
Legacy API Reference

cell_getSelectionExtendHandler

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

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

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

(_e) => void

Example

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