Table Docs
API Reference
Table API Reference
- Table
- TableOptions
- TableState
- TableMeta
- TableFeature
- TableFeatures
- StockFeatures
- CoreFeatures
- BaseAtoms
- Atoms
- ExternalAtoms
- constructTable
- tableOptions
- tableFeatures
- getInitialTableState
- OnChangeFn
- Updater
- DebugOptions
- createTable
- createTableHook
- createTableState
- SvelteTable
- AppSvelteTable
- renderComponent
- renderSnippet
- FlexRender
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
AI/LLM: This documentation page is available in plain markdown format at/table/latest/docs/framework/svelte/reference/functions/createTableState.md
Table API Reference
createTableState
ts
function createTableState<TState>(initialValue): [() => TState, (updater) => void];Defined in: packages/svelte-table/src/createTableState.svelte.ts:18
Creates a small Svelte 5 state holder that accepts TanStack Table updaters.
This is useful when a table state slice should be owned outside the table with $state, but still needs to accept both value and functional updater forms from on[State]Change callbacks.
Type Parameters#
TState#
TState
Parameters#
initialValue#
TState
Returns#
[() => TState, (updater) => void]
Example#
ts
const [pagination, setPagination] = createTableState({
pageIndex: 0,
pageSize: 10,
})