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_getSelectionStartHandler

ts
function cell_getSelectionStartHandler<TFeatures, TData, TValue>(cell, _contextDocument?): (e) => void;
function cell_getSelectionStartHandler<TFeatures, TData, TValue>(cell, _contextDocument?): (e) => void;

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

Creates a handler that begins a selection at this cell.

Follows header_getResizeHandler: the enable check is resolved once outside the returned closure and guarded again inside it, the document is injectable for SSR and cross-document rendering, and the document-level mouseup listener is attached here so a drag released outside the table still ends.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

TValue

TValue extends unknown = unknown

Parameters

cell

Cell<TFeatures, TData, TValue>

_contextDocument?

Document

Returns

(e) => void

Example

tsx
<td onMouseDown={cell.getSelectionStartHandler()} />
<td onMouseDown={cell.getSelectionStartHandler()} />