Defined in: types/TableFeatures.ts:308
Lifecycle hooks and defaults contributed by a table feature.
Feature objects are registered in the table's features option. They can contribute default state/options, default column definitions, table APIs, shared prototype APIs for rows/columns/headers/cells, and per-instance row or column data.
optional assignCellPrototype: <TFeatures, TData>(prototype, table) => void;Defined in: types/TableFeatures.ts:317
Adds feature methods to the shared cell prototype for a table.
This runs lazily the first time a cell is constructed for a table. Methods assigned here are shared by every cell instance created by that table, so this hook should be used for APIs and memoized methods rather than per-cell mutable data.
TFeatures extends TableFeatures
TData extends RowData
Record<string, any>
Table_Internal<TFeatures, TData>
void
optional assignColumnPrototype: <TFeatures, TData>(prototype, table) => void;Defined in: types/TableFeatures.ts:332
Adds feature methods to the shared column prototype for a table.
This runs lazily the first time a column is constructed for a table. Methods assigned here are shared by every column instance created by that table, so this hook should be used for APIs and memoized methods rather than per-column mutable data.
TFeatures extends TableFeatures
TData extends RowData
Record<string, any>
Table_Internal<TFeatures, TData>
void
optional assignHeaderPrototype: <TFeatures, TData>(prototype, table) => void;Defined in: types/TableFeatures.ts:347
Adds feature methods to the shared header prototype for a table.
This runs lazily the first time a header is constructed for a table. Methods assigned here are shared by every header instance created by that table, so this hook should be used for APIs and memoized methods rather than per-header mutable data.
TFeatures extends TableFeatures
TData extends RowData
Record<string, any>
Table_Internal<TFeatures, TData>
void
optional assignRowPrototype: <TFeatures, TData>(prototype, table) => void;Defined in: types/TableFeatures.ts:362
Adds feature methods to the shared row prototype for a table.
This runs lazily the first time a row is constructed for a table. Methods assigned here are shared by every row instance created by that table, so this hook should be used for APIs and memoized methods rather than per-row mutable data.
TFeatures extends TableFeatures
TData extends RowData
Record<string, any>
Table_Internal<TFeatures, TData>
void
optional constructTableAPIs: <TFeatures, TData>(table) => void;Defined in: types/TableFeatures.ts:374
Adds feature APIs directly to the table instance.
The table is a singleton, unlike rows, columns, headers, and cells, so table APIs are assigned directly instead of through a shared prototype. This runs while the table is being constructed, after options and initial state have been resolved.
TFeatures extends TableFeatures
TData extends RowData
Table_Internal<TFeatures, TData>
void
optional getDefaultColumnDef: <TFeatures, TData, TValue>() => ColumnDefBase_All<TFeatures, TData, TValue>;Defined in: types/TableFeatures.ts:384
Returns default column definition options contributed by this feature.
These defaults are merged into the table's default column definition before options.defaultColumn and before each user-supplied column definition is resolved, so users can override values supplied here.
TFeatures extends TableFeatures
TData extends RowData
TValue extends unknown = unknown
ColumnDefBase_All<TFeatures, TData, TValue>
optional getDefaultTableOptions: <TFeatures, TData>(table) => Partial<TableOptions_All<TFeatures, TData>>;Defined in: types/TableFeatures.ts:397
Returns default table options contributed by this feature.
This runs while table options are being resolved. Use it for option defaults such as feature enablement flags and default state-updater callbacks. User-supplied table options take precedence over values returned here.
TFeatures extends TableFeatures
TData extends RowData
Table_Internal<TFeatures, TData>
Partial<TableOptions_All<TFeatures, TData>>
optional getInitialState: (initialState) => TableState_All;Defined in: types/TableFeatures.ts:411
Returns this feature's initial table state.
The incoming initialState contains state accumulated from earlier features and user-provided initial state. Return a complete state object for this feature, preserving initialState so user-provided values can override feature defaults.
Partial<TableState_All>
optional initColumnInstanceData: <TFeatures, TData, TValue>(column) => void;Defined in: types/TableFeatures.ts:420
Initializes instance-specific data on each column.
This runs for every constructed column after core column fields such as id, depth, parent, columnDef, and columns have been assigned. Use this for per-column mutable data, caches, or annotations. Shared methods should be assigned via assignColumnPrototype instead.
TFeatures extends TableFeatures
TData extends RowData
TValue extends unknown = unknown
Column<TFeatures, TData, TValue>
void
optional initRowInstanceData: <TFeatures, TData>(row) => void;Defined in: types/TableFeatures.ts:435
Initializes instance-specific data on each row.
This runs for every constructed row after core row fields such as id, index, depth, original, parentId, and subRows have been assigned. Use this for per-row mutable data, caches, or annotations. Shared methods should be assigned via assignRowPrototype instead.
TFeatures extends TableFeatures
TData extends RowData
Row<TFeatures, TData>
void