Skip to content

Commit be58f3f

Browse files
docs(table): pin TanStack Table links to v8 (#6864)
1 parent 545f9e3 commit be58f3f

3 files changed

Lines changed: 18 additions & 18 deletions

File tree

docs/content/docs/1.getting-started/3.migration/2.v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ The default slot now only customizes the trigger, with additional slots for fine
469469
</template>
470470
```
471471

472-
- The `Table` component now uses [TanStack Table](https://tanstack.com/table/latest){target="_blank" rel="noopener"} under the hood. The `rows` prop has been renamed to `data`:
472+
- The `Table` component now uses [TanStack Table](https://tanstack.com/table/v8){target="_blank" rel="noopener"} under the hood. The `rows` prop has been renamed to `data`:
473473

474474
```diff
475475
<template>

docs/content/docs/2.components/table.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ links:
1010
avatar:
1111
src: https://github.com/tanstack.png
1212
loading: lazy
13-
to: https://tanstack.com/table/latest
13+
to: https://tanstack.com/table/v8
1414
- label: GitHub
1515
icon: i-simple-icons-github
1616
to: https://github.com/nuxt/ui/blob/v4/src/runtime/components/Table.vue
1717
---
1818

1919
## Usage
2020

21-
The Table component is built on top of [TanStack Table](https://tanstack.com/table/latest) and is powered by the [useVueTable](https://tanstack.com/table/latest/docs/framework/vue/vue-table#usevuetable) composable to provide a flexible and fully type-safe API.
21+
The Table component is built on top of [TanStack Table v8](https://tanstack.com/table/v8) and is powered by the [useVueTable](https://tanstack.com/table/v8/docs/framework/vue/vue-table#usevuetable) composable to provide a flexible and fully type-safe API.
2222

2323
It renders your data as rows and columns and supports sorting, filtering, pagination, row selection, expansion, grouping, pinning and virtualization, so you can build everything from a simple data table to a fully featured data grid.
2424

@@ -81,7 +81,7 @@ props:
8181

8282
### Columns
8383

84-
Use the `columns` prop as an array of [ColumnDef](https://tanstack.com/table/latest/docs/api/core/column-def) objects with properties like:
84+
Use the `columns` prop as an array of [ColumnDef](https://tanstack.com/table/v8/docs/api/core/column-def) objects with properties like:
8585

8686
- `accessorKey`: [The key of the row object to use when extracting the value for the column.]{class="text-muted"}
8787
- `header`: [The header to display for the column. If a string is passed, it can be used as a default for the column ID. If a function is passed, it will be passed a props object for the header and should return the rendered header value (the exact type depends on the adapter being used).]{class="text-muted"}
@@ -123,7 +123,7 @@ When rendering components with `h`, you can either use the `resolveComponent` fu
123123

124124
### Meta
125125

126-
Use the `meta` prop as an object ([TableMeta](https://tanstack.com/table/latest/docs/api/core/table#meta)) to pass properties like:
126+
Use the `meta` prop as an object ([TableMeta](https://tanstack.com/table/v8/docs/api/core/table#meta)) to pass properties like:
127127

128128
- `class`:
129129
- `tr`: [The classes to apply to the `tr` element.]{class="text-muted"}
@@ -274,7 +274,7 @@ class: '!p-0'
274274

275275
### With expandable rows
276276

277-
You can add a new column that renders a [Button](/docs/components/button) component inside the `cell` to toggle the expandable state of a row using the TanStack Table [Expanding APIs](https://tanstack.com/table/latest/docs/api/features/expanding).
277+
You can add a new column that renders a [Button](/docs/components/button) component inside the `cell` to toggle the expandable state of a row using the TanStack Table [Expanding APIs](https://tanstack.com/table/v8/docs/api/features/expanding).
278278

279279
::caution
280280
You need to define the `#expanded` slot to render the expanded content which will receive the row as a parameter.
@@ -302,7 +302,7 @@ You could also add this action to the [`DropdownMenu`](/docs/components/dropdown
302302

303303
### With grouped rows
304304

305-
You can group rows based on a given column value and show/hide sub rows via some button added to the cell using the TanStack Table [Grouping APIs](https://tanstack.com/table/latest/docs/api/features/grouping).
305+
You can group rows based on a given column value and show/hide sub rows via some button added to the cell using the TanStack Table [Grouping APIs](https://tanstack.com/table/v8/docs/api/features/grouping).
306306

307307
#### Important parts:
308308

@@ -326,7 +326,7 @@ class: '!p-0'
326326

327327
### With row pinning :badge{label="4.6+" class="align-text-top"}
328328

329-
You can add a column that renders a [Button](/docs/components/button) component inside the `cell` to toggle the pinning state of a row using the TanStack Table [Row Pinning APIs](https://tanstack.com/table/latest/docs/api/features/row-pinning). Pinned rows will stay at the top or bottom of the table regardless of sorting or filtering.
329+
You can add a column that renders a [Button](/docs/components/button) component inside the `cell` to toggle the pinning state of a row using the TanStack Table [Row Pinning APIs](https://tanstack.com/table/v8/docs/api/features/row-pinning). Pinned rows will stay at the top or bottom of the table regardless of sorting or filtering.
330330

331331
::component-example
332332
---
@@ -350,7 +350,7 @@ You can use the `row-pinning` prop to control the pinning state of the rows (can
350350

351351
### With row selection
352352

353-
You can add a new column that renders a [Checkbox](/docs/components/checkbox) component inside the `header` and `cell` to select rows using the TanStack Table [Row Selection APIs](https://tanstack.com/table/latest/docs/api/features/row-selection).
353+
You can add a new column that renders a [Checkbox](/docs/components/checkbox) component inside the `header` and `cell` to select rows using the TanStack Table [Row Selection APIs](https://tanstack.com/table/v8/docs/api/features/row-selection).
354354

355355
::component-example
356356
---
@@ -471,7 +471,7 @@ class: '!p-0'
471471

472472
### With column sorting
473473

474-
You can update a column `header` to render a [Button](/docs/components/button) component inside the `header` to toggle the sorting state using the TanStack Table [Sorting APIs](https://tanstack.com/table/latest/docs/api/features/sorting).
474+
You can update a column `header` to render a [Button](/docs/components/button) component inside the `header` to toggle the sorting state using the TanStack Table [Sorting APIs](https://tanstack.com/table/v8/docs/api/features/sorting).
475475

476476
::component-example
477477
---
@@ -509,7 +509,7 @@ In this example, we use a function to define the column header but you can also
509509

510510
### With column pinning
511511

512-
You can update a column `header` to render a [Button](/docs/components/button) component inside the `header` to toggle the pinning state using the TanStack Table [Pinning APIs](https://tanstack.com/table/latest/docs/api/features/row-pinning).
512+
You can update a column `header` to render a [Button](/docs/components/button) component inside the `header` to toggle the pinning state using the TanStack Table [Column Pinning APIs](https://tanstack.com/table/v8/docs/api/features/column-pinning).
513513

514514
::note
515515
A pinned column will become sticky on the left or right side of the table. When using column pinning, you should define explicit `size` values for your columns to ensure proper column width handling, especially with multiple pinned columns.
@@ -534,7 +534,7 @@ You can use the `column-pinning` prop to control the pinning state of the column
534534

535535
### With column visibility
536536

537-
You can use a [DropdownMenu](/docs/components/dropdown-menu) component to toggle the visibility of the columns using the TanStack Table [Column Visibility APIs](https://tanstack.com/table/latest/docs/api/features/column-visibility).
537+
You can use a [DropdownMenu](/docs/components/dropdown-menu) component to toggle the visibility of the columns using the TanStack Table [Column Visibility APIs](https://tanstack.com/table/v8/docs/api/features/column-visibility).
538538

539539
::component-example
540540
---
@@ -554,7 +554,7 @@ You can use the `column-visibility` prop to control the visibility state of the
554554

555555
### With column filters
556556

557-
You can use an [Input](/docs/components/input) component to filter per column the rows using the TanStack Table [Column Filtering APIs](https://tanstack.com/table/latest/docs/api/features/column-filtering).
557+
You can use an [Input](/docs/components/input) component to filter per column the rows using the TanStack Table [Column Filtering APIs](https://tanstack.com/table/v8/docs/api/features/column-filtering).
558558

559559
::component-example
560560
---
@@ -574,7 +574,7 @@ You can use the `column-filters` prop to control the filters state of the column
574574

575575
### With global filter
576576

577-
You can use an [Input](/docs/components/input) component to filter the rows using the TanStack Table [Global Filtering APIs](https://tanstack.com/table/latest/docs/api/features/global-filtering).
577+
You can use an [Input](/docs/components/input) component to filter the rows using the TanStack Table [Global Filtering APIs](https://tanstack.com/table/v8/docs/api/features/global-filtering).
578578

579579
::component-example
580580
---
@@ -593,9 +593,9 @@ You can use the `global-filter` prop to control the global filter state (can be
593593

594594
### With pagination
595595

596-
You can use a [Pagination](/docs/components/pagination) component to control the pagination state using the [Pagination APIs](https://tanstack.com/table/latest/docs/api/features/pagination).
596+
You can use a [Pagination](/docs/components/pagination) component to control the pagination state using the [Pagination APIs](https://tanstack.com/table/v8/docs/api/features/pagination).
597597

598-
There are different pagination approaches as explained in [Pagination Guide](https://tanstack.com/table/latest/docs/guide/pagination#pagination-guide). In this example, we use client-side pagination so we need to manually pass `getPaginationRowModel()`{lang="ts-type"} function.
598+
There are different pagination approaches as explained in [Pagination Guide](https://tanstack.com/table/v8/docs/guide/pagination#pagination-guide). In this example, we use client-side pagination so we need to manually pass `getPaginationRowModel()`{lang="ts-type"} function.
599599

600600
::component-example
601601
---
@@ -780,7 +780,7 @@ This will give you access to the following:
780780
| Name | Type |
781781
| ---- | ---- |
782782
| `tableRef`{lang="ts-type"} | `Ref<HTMLTableElement \| null>`{lang="ts-type"} |
783-
| `tableApi`{lang="ts-type"} | [`Table`{lang="ts-type"}](https://tanstack.com/table/latest/docs/api/core/table#table-api) |
783+
| `tableApi`{lang="ts-type"} | [`Table`{lang="ts-type"}](https://tanstack.com/table/v8/docs/api/core/table#table-api) |
784784

785785
## Theme
786786

skills/nuxt-ui/references/recipes/data-tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ const { data, status } = await useAsyncData(
216216

217217
## Tips
218218

219-
- Table is built on [TanStack Table](https://tanstack.com/table/latest) — columns use `ColumnDef` format with `accessorKey`, `header`, `cell`
219+
- Table is built on [TanStack Table v8](https://tanstack.com/table/v8) — columns use `ColumnDef` format with `accessorKey`, `header`, `cell`
220220
- Use `#<column>-cell` and `#<column>-header` template slots to customize rendering with Vue templates
221221
- Alternatively, use the `h` function inside `header` and `cell` column properties for inline rendering
222222
- Row data in slots is accessed via `row.original` (not `row` directly)

0 commit comments

Comments
 (0)