Skip to content

Commit f7bf6f1

Browse files
authored
docs: fix all 158 broken links (#5972)
Would obsolete #5965, #5918 if merged. I listed the broken links on my end like this: # utilizing lychee # lychee doesn't support checking links recursively from a web page; # but we do have a kind of sitemap here that we can pass to it. cd tanstack-table/docs/ lychee $(find . -name '*.md' | sed 's~./~https://tanstack.com/table/latest/docs/~;s/.md//') # for the local build; might also want `--timeout 60` lychee $(find . -name '*.md' | sed 's~./~http://localhost:3000/table/latest/docs/~;s/.md//') # sed's separator in 's/from/to/' can be changed to avoid escaping, # so 's~from~to~' has the same effect except slashes can stay as-is. # then s/.md// gets rid of the extension, completing the conversion # to deployed URLs. # (I'm explaining all this because I'm also scared by the xz takeover.) There is some magic with relative links: "../" seems to navigate to "../../" instead (???), while ./ is the current path. As a result every replacement here is manually done and tested with lychee. Exceptional cases are explained in the details section below. When checking the result afterwards, there may be one broken link left if locally only the /tanstack/tanstack.com and /tanstack/table repositories are checked out: from localhost:3000/table/latest/docs/guide/virtualization, linking to localhost:3000/virtual/v3/docs/api/virtualizer. This is an artifact of the way it's checked out. Detailed changes: docs/api/core/{cell,column,header-group,header,row,table}: link to /docs/guide/features currently link to /guide/features instead, and causes a redirect loop. This error is deployed right now: check eg. https://tanstack.com/table/latest/docs/api/core/cell and click the "table features" link. (This is not exceptional, just the first case I tackled.) docs/guide/headers: Aside from fixing paths, also fix an incorrect reference to non-existant Column Resizing Guide at docs/guide/column-resizing; presumably this is misspelling for the Column Sizing Guide at docs/guide/column-sizing. docs/guide/row-selection: Beyond fixing paths, also fix a missing /example/ in the vue example path.
1 parent 3efa59c commit f7bf6f1

39 files changed

+169
-169
lines changed

docs/api/core/cell.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Cell APIs
33
---
44

5-
These are **core** options and API properties for all cells. More options and API properties are available for other [table features](../../../guide/features).
5+
These are **core** options and API properties for all cells. More options and API properties are available for other [table features](../guide/features).
66

77
## Cell API
88

docs/api/core/column.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Column APIs
33
---
44

5-
These are **core** options and API properties for all columns. More options and API properties are available for other [table features](../../../guide/features).
5+
These are **core** options and API properties for all columns. More options and API properties are available for other [table features](../guide/features).
66

77
## Column API
88

docs/api/core/header-group.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: HeaderGroup APIs
33
---
44

5-
These are **core** options and API properties for all header groups. More options and API properties may be available for other [table features](../../../guide/features).
5+
These are **core** options and API properties for all header groups. More options and API properties may be available for other [table features](../guide/features).
66

77
## Header Group API
88

@@ -30,4 +30,4 @@ The depth of the header group, zero-indexed based.
3030
type headers = Header<TData>[]
3131
```
3232
33-
An array of [Header](../header) objects that belong to this header group
33+
An array of [Header](../api/core/header) objects that belong to this header group

docs/api/core/header.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Header APIs
33
---
44

5-
These are **core** options and API properties for all headers. More options and API properties may be available for other [table features](../../../guide/features).
5+
These are **core** options and API properties for all headers. More options and API properties may be available for other [table features](../guide/features).
66

77
## Header API
88

@@ -38,15 +38,15 @@ The depth of the header, zero-indexed based.
3838
column: Column<TData>
3939
```
4040

41-
The header's associated [Column](../column) object
41+
The header's associated [Column](../api/core/column) object
4242

4343
### `headerGroup`
4444

4545
```tsx
4646
headerGroup: HeaderGroup<TData>
4747
```
4848

49-
The header's associated [HeaderGroup](../header-group) object
49+
The header's associated [HeaderGroup](../api/core/header-group) object
5050

5151
### `subHeaders`
5252

docs/api/core/row.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Row APIs
33
---
44

5-
These are **core** options and API properties for all rows. More options and API properties are available for other [table features](../../../guide/features).
5+
These are **core** options and API properties for all rows. More options and API properties are available for other [table features](../guide/features).
66

77
## Row API
88

@@ -120,4 +120,4 @@ An array of the original subRows as returned by the `options.getSubRows` option.
120120
type getAllCells = () => Cell<TData>[]
121121
```
122122
123-
Returns all of the [Cells](../cell) for the row.
123+
Returns all of the [Cells](../api/core/cell) for the row.

docs/api/core/table.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ These functions are used to create a table. Which one you use depends on which f
1414
1515
## Options
1616
17-
These are **core** options and API properties for the table. More options and API properties are available for other [table features](../../../guide/features).
17+
These are **core** options and API properties for the table. More options and API properties are available for other [table features](../guide/features).
1818
1919
### `data`
2020
@@ -89,7 +89,7 @@ declare module '@tanstack/table-core' {
8989
}
9090
```
9191

92-
> 🧠 Think of this option as an arbitrary "context" for your table. This is a great way to pass arbitrary data or functions to your table without having to pass it to every thing the table touches. A good example is passing a locale object to your table to use for formatting dates, numbers, etc or even a function that can be used to update editable data like in the [editable-data example](../../../framework/react/examples/editable-data).
92+
> 🧠 Think of this option as an arbitrary "context" for your table. This is a great way to pass arbitrary data or functions to your table without having to pass it to every thing the table touches. A good example is passing a locale object to your table to use for formatting dates, numbers, etc or even a function that can be used to update editable data like in the [editable-data example](../framework/react/examples/editable-data).
9393
9494
### `state`
9595

docs/api/features/filters.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ id: filters
77

88
The Filtering API docs are now split into multiple API doc pages:
99

10-
- [Column Faceting](../column-faceting)
11-
- [Global Faceting](../global-faceting)
12-
- [Column Filtering](../column-filtering)
13-
- [Global Filtering](../global-filtering)
10+
- [Column Faceting](../api/features/column-faceting)
11+
- [Global Faceting](../api/features/global-faceting)
12+
- [Column Filtering](../api/features/column-filtering)
13+
- [Global Filtering](../api/features/global-filtering)

docs/api/features/global-filtering.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface GlobalFilterTableState {
2525

2626
## Filter Functions
2727

28-
You can use the same filter functions that are available for column filtering for global filtering. See the [Column Filtering APIs](../column-filtering) to learn more about filter functions.
28+
You can use the same filter functions that are available for column filtering for global filtering. See the [Column Filtering APIs](../api/features/column-filtering) to learn more about filter functions.
2929

3030
#### Using Filter Functions
3131

docs/api/features/pinning.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ id: pinning
77

88
The pinning apis are now split into multiple api pages:
99

10-
- [Column Pinning](../column-pinning)
11-
- [Row Pinning](../row-pinning)
10+
- [Column Pinning](../api/features/column-pinning)
11+
- [Row Pinning](../api/features/row-pinning)

docs/api/features/row-selection.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type RowSelectionTableState = {
1515
}
1616
```
1717
18-
By default, the row selection state uses the index of each row as the row identifiers. Row selection state can instead be tracked with a custom unique row id by passing in a custom [getRowId](../../../api/core/table.md#getrowid) function to the the table.
18+
By default, the row selection state uses the index of each row as the row identifiers. Row selection state can instead be tracked with a custom unique row id by passing in a custom [getRowId](../core/table.md#getrowid) function to the the table.
1919
2020
## Table Options
2121

docs/framework/react/guide/table-state.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ title: Table State (React) Guide
66

77
Want to skip to the implementation? Check out these examples:
88

9-
- [kitchen sink](../../examples/kitchen-sink)
10-
- [fully controlled](../../examples/fully-controlled)
9+
- [kitchen sink](../examples/kitchen-sink)
10+
- [fully controlled](../examples/fully-controlled)
1111

1212
## Table State (React) Guide
1313

docs/guide/cells.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ title: Cells Guide
44

55
## API
66

7-
[Cell API](../../api/core/cell)
7+
[Cell API](../api/core/cell)
88

99
## Cells Guide
1010

1111
This quick guide will discuss the different ways you can retrieve and interact with `cell` objects in TanStack Table.
1212

1313
### Where to Get Cells From
1414

15-
Cells come from [Rows](../rows). Enough said, right?
15+
Cells come from [Rows](../guide/rows). Enough said, right?
1616

1717
There are multiple `row` instance APIs you can use to retrieve the appropriate cells from a row depending on which features you are using. Most commonly, you will use the `row.getAllCells` or `row.getVisibleCells` APIs (if you are using column visibility features), but there are a handful of other similar APIs that you can use.
1818

@@ -32,7 +32,7 @@ During grouping or aggregation features, the `cell.id` will have additional stri
3232

3333
#### Cell Parent Objects
3434

35-
Every cell stores a reference to its parent [row](../rows) and [column](../columns) objects.
35+
Every cell stores a reference to its parent [row](../guide/rows) and [column](../guide/columns) objects.
3636

3737
#### Access Cell Values
3838

@@ -82,4 +82,4 @@ const columns = [
8282
{row.getVisibleCells().map(cell => {
8383
return <td key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</td>
8484
})}
85-
</tr>
85+
</tr>

docs/guide/column-defs.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ title: Columns Definitions Guide
44

55
## API
66

7-
[Column Def](../../api/core/column-def)
7+
[Column Def](../api/core/column-def)
88

99
## Column Definitions Guide
1010

11-
> Note: This guide is about setting up column definitions for your table and NOT about the actual [`column`](../columns) objects that are generated within the table instance.
11+
> Note: This guide is about setting up column definitions for your table and NOT about the actual [`column`](../guide/columns) objects that are generated within the table instance.
1212
1313
Column defs are the single most important part of building a table. They are responsible for:
1414

1515
- Building the underlying data model that will be used for everything including sorting, filtering, grouping, etc.
1616
- Formatting the data model into what will be displayed in the table
17-
- Creating [header groups](../../../api/core/header-group), [headers](../../../api/core/header) and [footers](../../../api/core/column-def#footer)
17+
- Creating [header groups](../api/core/header-group), [headers](../api/core/header) and [footers](../api/core/column-def#footer)
1818
- Creating columns for display-only purposes, eg. action buttons, checkboxes, expanders, sparklines, etc.
1919

2020
## Column Def Types
@@ -276,7 +276,7 @@ columnHelper.accessor('firstName', {
276276

277277
## Aggregated Cell Formatting
278278

279-
For more info on aggregated cells, see [grouping](../grouping).
279+
For more info on aggregated cells, see [grouping](../guide/grouping).
280280

281281
## Header & Footer Formatting
282282

docs/guide/column-faceting.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ title: Column Faceting Guide
66

77
Want to skip to the implementation? Check out these examples:
88

9-
- [filters-faceted](../../framework/react/examples/filters-faceted)
9+
- [filters-faceted](../framework/react/examples/filters-faceted)
1010

1111
## API
1212

13-
[Column Faceting API](../../api/features/column-faceting)
13+
[Column Faceting API](../api/features/column-faceting)
1414

1515
## Column Faceting Guide
1616

@@ -86,4 +86,4 @@ const table = useReactTable({
8686
})
8787
```
8888

89-
Alternatively, you don't have to put any of your faceting logic through the TanStack Table APIs at all. Just fetch your lists and pass them to your filter components directly.
89+
Alternatively, you don't have to put any of your faceting logic through the TanStack Table APIs at all. Just fetch your lists and pass them to your filter components directly.

docs/guide/column-filtering.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ title: Column Filtering Guide
66

77
Want to skip to the implementation? Check out these examples:
88

9-
- [Column Filters](../../framework/react/examples/filters)
10-
- [Faceted Filters](../../framework/react/examples/filters-faceted) (Autocomplete and Range filters)
11-
- [Fuzzy Search](../../framework/react/examples/filters-fuzzy) (Match Sorter)
12-
- [Editable Data](../../framework/react/examples/editable-data)
13-
- [Expanding](../../framework/react/examples/expanding) (Filtering from Sub-Rows)
14-
- [Grouping](../../framework/react/examples/grouping)
15-
- [Pagination](../../framework/react/examples/pagination)
16-
- [Row Selection](../../framework/react/examples/row-selection)
9+
- [Column Filters](../framework/react/examples/filters)
10+
- [Faceted Filters](../framework/react/examples/filters-faceted) (Autocomplete and Range filters)
11+
- [Fuzzy Search](../framework/react/examples/filters-fuzzy) (Match Sorter)
12+
- [Editable Data](../framework/react/examples/editable-data)
13+
- [Expanding](../framework/react/examples/expanding) (Filtering from Sub-Rows)
14+
- [Grouping](../framework/react/examples/grouping)
15+
- [Pagination](../framework/react/examples/pagination)
16+
- [Row Selection](../framework/react/examples/row-selection)
1717

1818
## API
1919

20-
[Column Filtering API](../../api/features/column-filtering)
20+
[Column Filtering API](../api/features/column-filtering)
2121

2222
## Column Filtering Guide
2323

@@ -31,7 +31,7 @@ TanStack table supports both client-side and manual server-side filtering. This
3131

3232
If you have a large dataset, you may not want to load all of that data into the client's browser in order to filter it. In this case, you will most likely want to implement server-side filtering, sorting, pagination, etc.
3333

34-
However, as also discussed in the [Pagination Guide](../pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides.
34+
However, as also discussed in the [Pagination Guide](../guide/pagination#should-you-use-client-side-pagination), a lot of developers underestimate how many rows can be loaded client-side without a performance hit. The TanStack table examples are often tested to handle up to 100,000 rows or more with decent performance for client-side filtering, sorting, pagination, and grouping. This doesn't necessarily mean that your app will be able to handle that many rows, but if your table is only going to have a few thousand rows at most, you might be able to take advantage of the client-side filtering, sorting, pagination, and grouping that TanStack table provides.
3535

3636
> TanStack Table can handle thousands of client-side rows with good performance. Don't rule out client-side filtering, pagination, sorting, etc. without some thought first.
3737

docs/guide/column-ordering.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ title: Column Ordering Guide
66

77
Want to skip to the implementation? Check out these examples:
88

9-
- [column-ordering](../../framework/react/examples/column-ordering)
10-
- [column-dnd](../../framework/react/examples/column-dnd)
9+
- [column-ordering](../framework/react/examples/column-ordering)
10+
- [column-dnd](../framework/react/examples/column-dnd)
1111

1212
## API
1313

14-
[Column Ordering API](../../api/features/column-ordering)
14+
[Column Ordering API](../api/features/column-ordering)
1515

1616
## Column Ordering Guide
1717

@@ -21,9 +21,9 @@ By default, columns are ordered in the order they are defined in the `columns` a
2121

2222
There are 3 table features that can reorder columns, which happen in the following order:
2323

24-
1. [Column Pinning](../column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.
24+
1. [Column Pinning](../guide/column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.
2525
2. Manual **Column Ordering** - A manually specified column order is applied.
26-
3. [Grouping](../grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow.
26+
3. [Grouping](../guide/grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.groupedColumnMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow.
2727

2828
> **Note:** `columnOrder` state will only affect unpinned columns if used in conjunction with column pinning.
2929
@@ -104,8 +104,8 @@ There are undoubtedly many ways to implement drag and drop features along-side T
104104

105105
1. Do NOT try to use [`"react-dnd"`](https://react-dnd.github.io/react-dnd/docs/overview) _if you are using React 18 or newer_. React DnD was an important library for its time, but it now does not get updated very often, and it has incompatibilities with React 18, especially in React Strict Mode. It is still possible to get it to work, but there are newer alternatives that have better compatibility and are more actively maintained. React DnD's Provider may also interfere and conflict with any other DnD solutions you may want to try in your app.
106106

107-
2. Use [`"@dnd-kit/core"`](https://dndkit.com/). DnD Kit is a modern, modular and lightweight drag and drop library that is highly compatible with the modern React ecosystem, and it works well with semantic `<table>` markup. Both of the official TanStack DnD examples, [Column DnD](../../framework/react/examples/column-dnd) and [Row DnD](../../framework/react/examples/row-dnd), now use DnD Kit.
107+
2. Use [`"@dnd-kit/core"`](https://dndkit.com/). DnD Kit is a modern, modular and lightweight drag and drop library that is highly compatible with the modern React ecosystem, and it works well with semantic `<table>` markup. Both of the official TanStack DnD examples, [Column DnD](../framework/react/examples/column-dnd) and [Row DnD](../framework/react/examples/row-dnd), now use DnD Kit.
108108

109109
3. Consider other DnD libraries like [`"react-beautiful-dnd"`](https://github.com/atlassian/react-beautiful-dnd), but be aware of their potentially large bundle sizes, maintenance status, and compatibility with `<table>` markup.
110110

111-
4. Consider using native browser events and state management to implement lightweight drag and drop features. However, be aware that this approach may not be best for mobile users if you do not go the extra mile to implement proper touch events. [Material React Table V2](https://www.material-react-table.com/docs/examples/column-ordering) is an example of a library that implements TanStack Table with only browser drag and drop events such as `onDragStart`, `onDragEnd`, `onDragEnter` and no other dependencies. Browse its source code to see how it is done.
111+
4. Consider using native browser events and state management to implement lightweight drag and drop features. However, be aware that this approach may not be best for mobile users if you do not go the extra mile to implement proper touch events. [Material React Table V2](https://www.material-react-table.com/docs/examples/column-ordering) is an example of a library that implements TanStack Table with only browser drag and drop events such as `onDragStart`, `onDragEnd`, `onDragEnter` and no other dependencies. Browse its source code to see how it is done.

0 commit comments

Comments
 (0)