Table API Reference
Column API Reference
Row API Reference
Cell API Reference
Header API Reference
Features API Reference
- stockFeatures
- coreFeatures
- coreCellsFeature
- coreColumnsFeature
- coreHeadersFeature
- coreRowModelsFeature
- coreRowsFeature
- coreTablesFeature
- cellSpanningFeature
- columnFilteringFeature
- columnFacetingFeature
- rowAggregationFeature
- columnGroupingFeature
- columnOrderingFeature
- columnPinningFeature
- columnResizingFeature
- columnSizingFeature
- columnVisibilityFeature
- globalFilteringFeature
- rowExpandingFeature
- rowPaginationFeature
- rowPinningFeature
- rowSelectionFeature
- rowSortingFeature
- filterFns
- sortFns
- aggregationFns
- ColumnFilter
- ColumnPinningState
- ColumnSort
- PaginationState
- RowPinningState
- columnResizingState
- FilterFn
- FilterFns
- FilterMeta
- SortFn
- SortFns
- AggregationFns
- AggregationContext
- AggregationMergeContext
- AggregationFnDef
- AggregationFnDescriptor
- AggregationValueContext
- AggregationValueResult
- constructAggregationFn
- ColumnFiltersState
- ColumnOrderState
- ColumnPinningPosition
- ColumnResizeDirection
- ColumnResizeMode
- ColumnSizingState
- ColumnVisibilityState
- ExpandedState
- GroupingState
- RowPinningPosition
- RowSelectionState
- SortDirection
- SortingState
- AggregationFnOption
- AggregationResult
- FilterFnOption
- SortFnOption
- BuiltInAggregationFn
- BuiltInFilterFn
- BuiltInSortFn
Static Functions API Reference
Legacy API Reference
- Legacy API Overview
- useLegacyTable
- legacyCreateColumnHelper
- getCoreRowModel
- getFilteredRowModel
- getSortedRowModel
- getGroupedRowModel
- getExpandedRowModel
- getPaginationRowModel
- getFacetedRowModel
- getFacetedMinMaxValues
- getFacetedUniqueValues
- LegacyRowModelOptions
- LegacyTable
- LegacyTableOptions
- LegacyReactTable
- LegacyColumnDef
Subscribe
Call Signature#
function Subscribe<TSourceValue>(props): ReactNode | Promise<ReactNode>;Defined in: src/Subscribe.ts:122
A React component that allows you to subscribe to the table state.
This is useful for opting into state re-renders for specific parts of the table state.
For table.Subscribe from useTable, prefer that API — it uses overloads so JSX contextual typing works. This standalone component uses a union props type.
Type Parameters#
TSourceValue#
TSourceValue
Parameters#
props#
SubscribePropsWithSourceIdentity<TSourceValue>
Returns#
ReactNode | Promise<ReactNode>
Examples#
// As a standalone component — full store
<Subscribe source={table.store} selector={(state) => ({ rowSelection: state.rowSelection })}>
{({ rowSelection }) => (
<div>Selected rows: {Object.keys(rowSelection).length}</div>
)}
</Subscribe>// Entire source (atom or store) — no selector
<Subscribe source={table.atoms.rowSelection}>
{(rowSelection) => <div>...</div>}
</Subscribe>// Project source value (e.g. one row’s selection)
<Subscribe
source={table.atoms.rowSelection}
selector={(rowSelection) => rowSelection?.[row.id]}
>
{(selected) => <tr data-selected={!!selected}>...</tr>}
</Subscribe>// As table.Subscribe (table instance method)
<table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>
{({ rowSelection }) => (
<div>Selected rows: {Object.keys(rowSelection).length}</div>
)}
</table.Subscribe>Call Signature#
function Subscribe<TSourceValue, TSelected>(props): ReactNode | Promise<ReactNode>;Defined in: src/Subscribe.ts:125
A React component that allows you to subscribe to the table state.
This is useful for opting into state re-renders for specific parts of the table state.
For table.Subscribe from useTable, prefer that API — it uses overloads so JSX contextual typing works. This standalone component uses a union props type.
Type Parameters#
TSourceValue#
TSourceValue
TSelected#
TSelected
Parameters#
props#
SubscribePropsWithSourceWithSelector<TSourceValue, TSelected>
Returns#
ReactNode | Promise<ReactNode>
Examples#
// As a standalone component — full store
<Subscribe source={table.store} selector={(state) => ({ rowSelection: state.rowSelection })}>
{({ rowSelection }) => (
<div>Selected rows: {Object.keys(rowSelection).length}</div>
)}
</Subscribe>// Entire source (atom or store) — no selector
<Subscribe source={table.atoms.rowSelection}>
{(rowSelection) => <div>...</div>}
</Subscribe>// Project source value (e.g. one row’s selection)
<Subscribe
source={table.atoms.rowSelection}
selector={(rowSelection) => rowSelection?.[row.id]}
>
{(selected) => <tr data-selected={!!selected}>...</tr>}
</Subscribe>// As table.Subscribe (table instance method)
<table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>
{({ rowSelection }) => (
<div>Selected rows: {Object.keys(rowSelection).length}</div>
)}
</table.Subscribe>Call Signature#
function Subscribe<TFeatures, TSelected>(props): ReactNode | Promise<ReactNode>;Defined in: src/Subscribe.ts:128
A React component that allows you to subscribe to the table state.
This is useful for opting into state re-renders for specific parts of the table state.
For table.Subscribe from useTable, prefer that API — it uses overloads so JSX contextual typing works. This standalone component uses a union props type.
Type Parameters#
TFeatures#
TFeatures extends TableFeatures
TSelected#
TSelected
Parameters#
props#
SubscribePropsWithStore<TFeatures, TSelected>
Returns#
ReactNode | Promise<ReactNode>
Examples#
// As a standalone component — full store
<Subscribe source={table.store} selector={(state) => ({ rowSelection: state.rowSelection })}>
{({ rowSelection }) => (
<div>Selected rows: {Object.keys(rowSelection).length}</div>
)}
</Subscribe>// Entire source (atom or store) — no selector
<Subscribe source={table.atoms.rowSelection}>
{(rowSelection) => <div>...</div>}
</Subscribe>// Project source value (e.g. one row’s selection)
<Subscribe
source={table.atoms.rowSelection}
selector={(rowSelection) => rowSelection?.[row.id]}
>
{(selected) => <tr data-selected={!!selected}>...</tr>}
</Subscribe>// As table.Subscribe (table instance method)
<table.Subscribe selector={(state) => ({ rowSelection: state.rowSelection })}>
{({ rowSelection }) => (
<div>Selected rows: {Object.keys(rowSelection).length}</div>
)}
</table.Subscribe>