Solid Table setup and integration
Before starting, run intent load @tanstack/table-core#core for the shared headless model and stable-input rules.
Setup
import { For, createSignal } from 'solid-js'
import {
createColumnHelper,
createTable,
tableFeatures,
} from '@tanstack/solid-table'
type Person = { name: string }
const features = tableFeatures({})
const helper = createColumnHelper<typeof features, Person>()
const columns = helper.columns([helper.accessor('name', { header: 'Name' })])
export function PeopleTable() {
const [data] = createSignal<Person[]>([{ name: 'Ada' }])
const table = createTable({
features,
columns,
get data() {
return data()
},
})
return (
<table>
<thead>
<For each={table.getHeaderGroups()}>
{(group) => (
<tr>
<For each={group.headers}>
{(header) => (
<th>
<table.FlexRender header={header} />
</th>
)}
</For>
</tr>
)}
</For>
</thead>
<tbody>
<For each={table.getRowModel().rows}>
{(row) => (
<tr>
<For each={row.getAllCells()}>
{(cell) => (
<td>
<table.FlexRender cell={cell} />
</td>
)}
</For>
</tr>
)}
</For>
</tbody>
</table>
)
}
Essential constraints
Use createTable in a Solid owner. Preserve changing data with get data() { return data() }; data: data() captures a snapshot. Keep features and columns stable and derive transformed arrays with createMemo.
Table owns models and state. The application owns markup, CSS, interactions, and accessibility. Core-only tables use row.getAllCells(); visibility-aware methods need columnVisibilityFeature. Optional state and APIs require their features. Put row-model slots after their prerequisite features in tableFeatures().
Load by task
- For repeated features, defaults, typed contexts, or component registries, read reusable app hooks.
- For Query-backed data, server pages, sorting, filtering, or request keys, read TanStack Query integration.
- For virtual rows, columns, dynamic measurement, or infinite scrolling, read TanStack Virtual integration.
- For controlled state, tracked reads, or render subscriptions, read table state.
- For feature registration, missing feature APIs, or processing ownership, run
intent load @tanstack/table-core#table-features and read only references needed by the task.
- For v8 code, read the migration checklist.
API discovery
Inspect node_modules/@tanstack/solid-table/dist/index.d.ts, then the exported adapter declarations for the installed version. Inspect optional core APIs under node_modules/@tanstack/table-core/dist/features/.
1---2name: getting-started-53description: Create and render Table v9 with the solid adapter. Route reusable createTableHook components, Query and Virtual integration, and framework setup; use table-state for reactive ownership.4metadata:5 source: https://skillmd.com/skills/tanstack/getting-started-56 type: framework7 library: '@tanstack/solid-table'8 library_version: '9.3.1'9 framework: solid10requires:11 - '@tanstack/table-core#core'12sources:13 - TanStack/table:docs/framework/solid/guide/migrating.md14 - TanStack/table:examples/solid/basic-use-table15 - TanStack/table:packages/solid-table/src/index.tsx16 - TanStack/table:docs/framework/solid/guide/composable-tables.md17 - TanStack/table:examples/solid/composable-tables18 - TanStack/table:packages/solid-table/src/createTableHook.tsx19 - TanStack/table:examples/solid/with-tanstack-query20 - TanStack/table:docs/framework/solid/guide/pagination.md21 - TanStack/table:docs/framework/solid/guide/virtualization.md22 - TanStack/table:examples/solid/virtualized-rows23 - TanStack/table:examples/solid/virtualized-columns24 - TanStack/table:examples/solid/virtualized-infinite-scrolling25---2627# Solid Table setup and integration2829Before starting, run `intent load @tanstack/table-core#core` for the shared headless model and stable-input rules.3031## Setup3233```tsx34import { For, createSignal } from 'solid-js'35import {36 createColumnHelper,37 createTable,38 tableFeatures,39} from '@tanstack/solid-table'4041type Person = { name: string }42const features = tableFeatures({})43const helper = createColumnHelper<typeof features, Person>()44const columns = helper.columns([helper.accessor('name', { header: 'Name' })])4546export function PeopleTable() {47 const [data] = createSignal<Person[]>([{ name: 'Ada' }])48 const table = createTable({49 features,50 columns,51 get data() {52 return data()53 },54 })55 return (56 <table>57 <thead>58 <For each={table.getHeaderGroups()}>59 {(group) => (60 <tr>61 <For each={group.headers}>62 {(header) => (63 <th>64 <table.FlexRender header={header} />65 </th>66 )}67 </For>68 </tr>69 )}70 </For>71 </thead>72 <tbody>73 <For each={table.getRowModel().rows}>74 {(row) => (75 <tr>76 <For each={row.getAllCells()}>77 {(cell) => (78 <td>79 <table.FlexRender cell={cell} />80 </td>81 )}82 </For>83 </tr>84 )}85 </For>86 </tbody>87 </table>88 )89}90```9192## Essential constraints9394Use `createTable` in a Solid owner. Preserve changing data with `get data() { return data() }`; `data: data()` captures a snapshot. Keep features and columns stable and derive transformed arrays with `createMemo`.9596Table owns models and state. The application owns markup, CSS, interactions, and accessibility. Core-only tables use `row.getAllCells()`; visibility-aware methods need `columnVisibilityFeature`. Optional state and APIs require their features. Put row-model slots after their prerequisite features in `tableFeatures()`.9798## Load by task99100- For repeated features, defaults, typed contexts, or component registries, read [reusable app hooks](references/create-table-hook.md).101- For Query-backed data, server pages, sorting, filtering, or request keys, read [TanStack Query integration](references/with-tanstack-query.md).102- For virtual rows, columns, dynamic measurement, or infinite scrolling, read [TanStack Virtual integration](references/with-tanstack-virtual.md).103- For controlled state, tracked reads, or render subscriptions, read [table state](../table-state/SKILL.md).104- For feature registration, missing feature APIs, or processing ownership, run `intent load @tanstack/table-core#table-features` and read only references needed by the task.105- For v8 code, read the [migration checklist](../migrate-v8-to-v9/SKILL.md).106107## API discovery108109Inspect `node_modules/@tanstack/solid-table/dist/index.d.ts`, then the exported adapter declarations for the installed version. Inspect optional core APIs under `node_modules/@tanstack/table-core/dist/features/`.