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/renderSnippet.md
Table API Reference
renderSnippet
ts
function renderSnippet<TProps>(snippet, params?): RenderSnippetConfig<TProps>;Defined in: packages/svelte-table/src/render-component.ts:104
Wraps a Svelte snippet so it can be returned from a column definition renderer such as cell, header, or footer.
The snippet must only take one parameter.
This is only to be used with Snippets - use renderComponent for Svelte Components.
Type Parameters#
TProps#
TProps
Parameters#
snippet#
Snippet<[TProps]>
The snippet to render.
params?#
TProps
The single parameter object passed to the snippet.
Returns#
RenderSnippetConfig<TProps>
A RenderSnippetConfig consumed by the Svelte FlexRender component.
Example#
ts
// +page.svelte
const defaultColumns = [
columnHelper.accessor('name', {
cell: cell => renderSnippet(nameSnippet, { name: cell.row.name }),
}),
columnHelper.accessor('state', {
cell: cell => renderSnippet(stateSnippet, { state: cell.row.state }),
}),
]