Docs
CodeRabbit
Cloudflare
Railway
AG Grid
WorkOS
OpenRouter
Netlify
SerpAPI
Clerk
Prisma
Sentry
Unkey
Electric
CodeRabbit
Cloudflare
Railway
AG Grid
WorkOS
OpenRouter
Netlify
SerpAPI
Clerk
Prisma
Sentry
Unkey
Electric
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
Static Functions API Reference

cell_getContext

Function: cell_getContext()

ts
function cell_getContext<TFeatures, TData, TValue>(cell): object;
function cell_getContext<TFeatures, TData, TValue>(cell): object;

Defined in: core/cells/coreCellsFeature.utils.ts:54

Builds the render context passed to a column's cell template.

The returned object includes stable references to the table, row, column, and cell, plus bound getValue and renderValue helpers for render functions.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

TValue

TValue extends unknown = unknown

Parameters

cell

Cell<TFeatures, TData, TValue>

Returns

object

cell

ts
cell: Cell<TFeatures, TData, TValue>;
cell: Cell<TFeatures, TData, TValue>;

column

ts
column: Column<TFeatures, TData, TValue> = cell.column;
column: Column<TFeatures, TData, TValue> = cell.column;

getValue()

ts
getValue: () => NoInfer<TValue>;
getValue: () => NoInfer<TValue>;

Returns

NoInfer<TValue>

renderValue()

ts
renderValue: () => NoInfer<TValue | null>;
renderValue: () => NoInfer<TValue | null>;

Returns

NoInfer<TValue | null>

row

ts
row: Row<TFeatures, TData> = cell.row;
row: Row<TFeatures, TData> = cell.row;

table

ts
table: Table_Internal<TFeatures, TData> = cell.table;
table: Table_Internal<TFeatures, TData> = cell.table;

Example

ts
const context = cell_getContext(cell)
const context = cell_getContext(cell)