Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
{ "label": "Cells", "to": "guide/cells" },
{ "label": "Header Groups", "to": "guide/header-groups" },
{ "label": "Headers", "to": "guide/headers" },
{ "label": "Columns", "to": "guide/columns" }
{ "label": "Columns", "to": "guide/columns" },
{ "label": "Table and Column Meta", "to": "guide/table-and-column-meta" }
],
"frameworks": [
{
Expand Down
19 changes: 16 additions & 3 deletions docs/framework/angular/guide/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,9 +718,22 @@ import type { StockFeatures, ColumnDef } from '@tanstack/angular-table'
const columns: ColumnDef<StockFeatures, Person>[] = [...]
```

### `ColumnMeta` Generic Change
### `TableMeta`/`ColumnMeta` Typing Changes

If you're using module augmentation to extend `ColumnMeta`, note that it now requires a `TFeatures` parameter.
No more declaration merging required! (Although it still works if you want to keep using it)

Global declaration merging to extend `TableMeta` or `ColumnMeta` works exactly like it did in v8. The only change you need to make is updating the generics shape: both interfaces now take `TFeatures` as the first type parameter.

Optionally, v9 also adds a new way to declare meta types **per-table** without declaration merging. You can use type-only `tableMeta`/`columnMeta` slots on the `features` option, which only affect tables created with that `features` object:

```ts
const features = tableFeatures({
rowSortingFeature,
columnMeta: metaHelper<{ customProperty: string }>(),
})
```

See the new [Table and Column Meta Guide](../../../guide/table-and-column-meta) for full details on both approaches.

### `RowData` Type Restriction

Expand Down Expand Up @@ -750,7 +763,7 @@ This change improves type safety. If you were passing unusual data types, ensure
- [ ] Rename `sortingFn` → `sortFn` in column definitions
- [ ] Split column sizing/resizing: use both `columnSizingFeature` and `columnResizingFeature` if needed
- [ ] Rename `columnSizingInfo` state → `columnResizing` (and related options)
- [ ] Update `ColumnMeta` module augmentation to include `TFeatures` generic (if used)
- [ ] If you use `TableMeta`/`ColumnMeta` declaration merging, add the `TFeatures` generic to your augmentations (optionally, switch to the per-table `tableMeta`/`columnMeta` feature slots)
- [ ] (Optional) Use `tableOptions()` for composable configurations
- [ ] (Optional) Use `createTableHook` for reusable table patterns

Expand Down
19 changes: 18 additions & 1 deletion docs/framework/lit/guide/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,11 @@ import type { StockFeatures } from '@tanstack/lit-table'
type PersonColumn = ColumnDef<StockFeatures, Person>
```

### `ColumnMeta` Generic Change
### `TableMeta`/`ColumnMeta` Typing Changes

No more declaration merging required! (Although it still works if you want to keep using it)

Global declaration merging works exactly like it did in v8. The only change you need to make is updating the generics shape: both interfaces now take `TFeatures` as the first type parameter.

```ts
declare module '@tanstack/lit-table' {
Expand All @@ -596,6 +600,19 @@ declare module '@tanstack/lit-table' {
}
```

That's all that's required if you want to keep declaring meta types globally.

Optionally, v9 also adds a new way to declare meta types **per-table** without declaration merging. You can use type-only `tableMeta`/`columnMeta` slots on the `features` option, which only affect tables created with that `features` object:

```ts
const features = tableFeatures({
rowSortingFeature,
columnMeta: metaHelper<{ align?: 'left' | 'right' }>(),
})
```

See the new [Table and Column Meta Guide](../../../guide/table-and-column-meta) for full details on both approaches.

### `RowData` Type Restriction

Prefer explicit object row types:
Expand Down
19 changes: 17 additions & 2 deletions docs/framework/preact/guide/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,11 @@ import type { StockFeatures } from '@tanstack/preact-table'
type PersonColumn = ColumnDef<StockFeatures, Person>
```

### `ColumnMeta` Generic Change
### `TableMeta`/`ColumnMeta` Typing Changes

Module augmentation now includes `TFeatures`:
No more declaration merging required! (Although it still works if you want to keep using it)

Global declaration merging works exactly like it did in v8. The only change you need to make is updating the generics shape: both interfaces now take `TFeatures` as the first type parameter.

```tsx
declare module '@tanstack/preact-table' {
Expand All @@ -585,6 +587,19 @@ declare module '@tanstack/preact-table' {
}
```

That's all that's required if you want to keep declaring meta types globally.

Optionally, v9 also adds a new way to declare meta types **per-table** without declaration merging. You can use type-only `tableMeta`/`columnMeta` slots on the `features` option, which only affect tables created with that `features` object:

```tsx
const features = tableFeatures({
rowSortingFeature,
columnMeta: metaHelper<{ align?: 'left' | 'right' }>(),
})
```

See the new [Table and Column Meta Guide](../../../guide/table-and-column-meta) for full details on both approaches.

### `RowData` Type Restriction

`RowData` is now constrained to record-like objects or arrays. Prefer object row types such as:
Expand Down
21 changes: 18 additions & 3 deletions docs/framework/react/guide/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -988,9 +988,11 @@ import type { StockFeatures, ColumnDef } from '@tanstack/react-table'
const columns: ColumnDef<StockFeatures, Person>[] = [...]
```

### `ColumnMeta` Generic Change
### `TableMeta`/`ColumnMeta` Typing Changes

If you're using module augmentation to extend `ColumnMeta`, note that it now requires a `TFeatures` parameter:
No more declaration merging required! (Although it still works if you want to keep using it)

Global declaration merging to extend `TableMeta` or `ColumnMeta` works exactly like it did in v8. The only change you need to make is updating the generics shape: both interfaces now take `TFeatures` as the first type parameter.

```tsx
// v8
Expand All @@ -1008,6 +1010,19 @@ declare module '@tanstack/react-table' {
}
```

That's all that's required if you want to keep declaring meta types globally.

Optionally, v9 also adds a new way to declare meta types **per-table** without declaration merging. You can use type-only `tableMeta`/`columnMeta` slots on the `features` option, which only affect tables created with that `features` object:

```tsx
const features = tableFeatures({
rowSortingFeature,
columnMeta: metaHelper<{ customProperty: string }>(),
})
```

See the new [Table and Column Meta Guide](../../../guide/table-and-column-meta) for full details on both approaches.

### `RowData` Type Restriction

The `RowData` type is now more restrictive:
Expand Down Expand Up @@ -1037,7 +1052,7 @@ This change improves type safety. If you were passing unusual data types, ensure
- [ ] Rename `sortingFn` → `sortFn` in column definitions
- [ ] Split column sizing/resizing: use both `columnSizingFeature` and `columnResizingFeature` if needed
- [ ] Rename `columnSizingInfo` state → `columnResizing` (and related options)
- [ ] Update `ColumnMeta` module augmentation to include `TFeatures` generic (if used)
- [ ] If you use `TableMeta`/`ColumnMeta` declaration merging, add the `TFeatures` generic to your augmentations (optionally, switch to the per-table `tableMeta`/`columnMeta` feature slots)
- [ ] (Optional) Add `table.Subscribe` for render optimizations
- [ ] (Optional) Subscribe to individual slices via `table.atoms.<slice>` + `useSelector` for the narrowest re-renders
- [ ] (Optional) Pass writable atoms via the new `atoms` option to own specific state slices externally
Expand Down
19 changes: 18 additions & 1 deletion docs/framework/solid/guide/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,11 @@ import type { StockFeatures } from '@tanstack/solid-table'
type PersonColumn = ColumnDef<StockFeatures, Person>
```

### `ColumnMeta` Generic Change
### `TableMeta`/`ColumnMeta` Typing Changes

No more declaration merging required! (Although it still works if you want to keep using it)

Global declaration merging works exactly like it did in v8. The only change you need to make is updating the generics shape: both interfaces now take `TFeatures` as the first type parameter.

```tsx
declare module '@tanstack/solid-table' {
Expand All @@ -552,6 +556,19 @@ declare module '@tanstack/solid-table' {
}
```

That's all that's required if you want to keep declaring meta types globally.

Optionally, v9 also adds a new way to declare meta types **per-table** without declaration merging. You can use type-only `tableMeta`/`columnMeta` slots on the `features` option, which only affect tables created with that `features` object:

```tsx
const features = tableFeatures({
rowSortingFeature,
columnMeta: metaHelper<{ align?: 'left' | 'right' }>(),
})
```

See the new [Table and Column Meta Guide](../../../guide/table-and-column-meta) for full details on both approaches.

### `RowData` Type Restriction

Prefer explicit object row types:
Expand Down
19 changes: 18 additions & 1 deletion docs/framework/svelte/guide/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,11 @@ import type { StockFeatures } from '@tanstack/svelte-table'
type PersonColumn = ColumnDef<StockFeatures, Person>
```

### `ColumnMeta` Generic Change
### `TableMeta`/`ColumnMeta` Typing Changes

No more declaration merging required! (Although it still works if you want to keep using it)

Global declaration merging works exactly like it did in v8. The only change you need to make is updating the generics shape: both interfaces now take `TFeatures` as the first type parameter.

```ts
declare module '@tanstack/svelte-table' {
Expand All @@ -631,6 +635,19 @@ declare module '@tanstack/svelte-table' {
}
```

That's all that's required if you want to keep declaring meta types globally.

Optionally, v9 also adds a new way to declare meta types **per-table** without declaration merging. You can use type-only `tableMeta`/`columnMeta` slots on the `features` option, which only affect tables created with that `features` object:

```ts
const features = tableFeatures({
rowSortingFeature,
columnMeta: metaHelper<{ align?: 'left' | 'right' }>(),
})
```

See the new [Table and Column Meta Guide](../../../guide/table-and-column-meta) for full details on both approaches.

### `RowData` Type Restriction

Prefer explicit object row types:
Expand Down
19 changes: 18 additions & 1 deletion docs/framework/vue/guide/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,11 @@ import type { StockFeatures } from '@tanstack/vue-table'
type PersonColumn = ColumnDef<StockFeatures, Person>
```

### `ColumnMeta` Generic Change
### `TableMeta`/`ColumnMeta` Typing Changes

No more declaration merging required! (Although it still works if you want to keep using it)

Global declaration merging works exactly like it did in v8. The only change you need to make is updating the generics shape: both interfaces now take `TFeatures` as the first type parameter.

```ts
declare module '@tanstack/vue-table' {
Expand All @@ -577,6 +581,19 @@ declare module '@tanstack/vue-table' {
}
```

That's all that's required if you want to keep declaring meta types globally.

Optionally, v9 also adds a new way to declare meta types **per-table** without declaration merging. You can use type-only `tableMeta`/`columnMeta` slots on the `features` option, which only affect tables created with that `features` object:

```ts
const features = tableFeatures({
rowSortingFeature,
columnMeta: metaHelper<{ align?: 'left' | 'right' }>(),
})
```

See the new [Table and Column Meta Guide](../../../guide/table-and-column-meta) for full details on both approaches.

### `RowData` Type Restriction

Prefer explicit object row types:
Expand Down
Loading
Loading