Defined in: types/TableOptions.ts:33
Core options that are always available on a table, before optional feature options are mixed in.
TFeatures extends TableFeatures
TData extends RowData
readonly optional atoms: Partial<{ [K in string | number | symbol]: Atom<ExtractFeatureMapTypes<TFeatures, TableState_FeatureMap>[K]> }>;Defined in: core/table/coreTablesFeature.types.ts:109
Optionally, provide your own external writable atoms for individual state slices. When an atom is provided for a given slice, it takes precedence over options.state[key] and the internal base atom for that slice. Feature state update APIs write through the corresponding atom updater, so external atoms are the preferred v9 ownership model for app-managed table state slices.
readonly optional autoResetAll: boolean;Defined in: core/table/coreTablesFeature.types.ts:113
Set this option to override any of the autoReset... feature options.
TableOptions_Table.autoResetAll
columns: readonly ColumnDef<TFeatures, TData, unknown>[];Defined in: core/columns/coreColumnsFeature.types.ts:69
The array of column defs to use for the table.
readonly data: readonly TData[];Defined in: core/table/coreTablesFeature.types.ts:117
The data for the table to display. When the data option changes reference, the table will reprocess the data.
optional defaultColumn: Partial<ColumnDef<TFeatures, TData, unknown>>;Defined in: core/columns/coreColumnsFeature.types.ts:73
Default column options to use for all column defs supplied to the table.
TableOptions_Columns.defaultColumn
readonly features: TFeatures & ValidateFeatureSlots<TFeatures>;Defined in: core/table/coreTablesFeature.types.ts:101
The feature modules registered on this table instance.
Feature registration controls which state slices, options, and prototype APIs are available. This object also carries the table's row model factories (sortedRowModel, filteredRowModel, etc.), row model function registries (sortFns, filterFns, aggregationFns), and type-only meta slots (tableMeta, columnMeta).
optional getRowId: (originalRow, index, parent?) => string;Defined in: core/rows/coreRowsFeature.types.ts:115
This optional function is used to derive a unique ID for any given row. If not provided the row's index is used (nested rows join together with . using their grandparents' index e.g. index.index.index). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity e.g. a userId, taskId, database ID field, etc.
TData
number
Row<TFeatures, TData>
string
getRowId: row => row.userIdoptional getSubRows: (originalRow, index) => readonly TData[] | undefined;Defined in: core/rows/coreRowsFeature.types.ts:124
This optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row.
TData
number
readonly TData[] | undefined
getSubRows: row => row.subRowsreadonly optional initialState: Partial<ExtractFeatureMapTypes<TFeatures, TableState_FeatureMap>>;Defined in: core/table/coreTablesFeature.types.ts:131
Optionally provide starting values for registered table state slices. Feature reset APIs use this value by default, and many reset APIs accept true to reset to that feature's blank/default state instead. Changing this object later does not reset table state, so it does not need to be stable.
TableOptions_Table.initialState
readonly optional key: string;Defined in: core/table/coreTablesFeature.types.ts:124
Optional key used to identify this table instance.
This is used by TanStack Table Devtools to register and select tables. It is not required unless the table is passed to devtools.
readonly optional mergeOptions: (defaultOptions, options) => TableOptions<TFeatures, TData>;Defined in: core/table/coreTablesFeature.types.ts:135
This option is used to optionally implement the merging of table options.
TableOptions<TFeatures, TData>
Partial<TableOptions<TFeatures, TData>>
TableOptions<TFeatures, TData>
TableOptions_Table.mergeOptions
readonly optional meta: ExtractTableMeta<TFeatures, TData>;Defined in: core/table/coreTablesFeature.types.ts:145
You can pass any object to options.meta and access it anywhere the table is available via table.options.meta.
Declare its type per-table via the tableMeta type-only slot on the features option, or globally via declaration merging on TableMeta.
optional renderFallbackValue: any;Defined in: core/cells/coreCellsFeature.types.ts:67
Value used when the desired value is not found in the data.
TableOptions_Cell.renderFallbackValue
readonly optional state: Partial<ExtractFeatureMapTypes<TFeatures, TableState_FeatureMap>>;Defined in: core/table/coreTablesFeature.types.ts:153
Optionally provide externally managed values for individual state slices.
Pair each slice with its matching on[State]Change callback so table state updates can be persisted outside the table. External atoms take precedence over this option when both are provided for the same slice.