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

table_getFocusedCell

ts
function table_getFocusedCell<TFeatures, TData>(table):
  | Cell<TFeatures, TData, any>
  | undefined;
function table_getFocusedCell<TFeatures, TData>(table):
  | Cell<TFeatures, TData, any>
  | undefined;

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

Returns the active cell, i.e. the anchor of the most recent operation.

Focus is derived rather than stored: in spreadsheet semantics, dragging from A1 to C5 leaves the active cell at A1, so the active range's anchor already is the active cell.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

| Cell<TFeatures, TData, any> | undefined

Example

ts
const cell = table_getFocusedCell(table)
const cell = table_getFocusedCell(table)