You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,9 +21,9 @@ By default, columns are ordered in the order they are defined in the `columns` a
21
21
22
22
There are 3 table features that can reorder columns, which happen in the following order:
23
23
24
-
1.[Column Pinning](../guide/column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.
24
+
1.[Column Pinning](../column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.
25
25
2. Manual **Column Ordering** - A manually specified column order is applied.
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.
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.
27
27
28
28
> **Note:**`columnOrder` state will only affect unpinned columns if used in conjunction with column pinning.
29
29
@@ -104,7 +104,7 @@ There are undoubtedly many ways to implement drag and drop features along-side T
104
104
105
105
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.
106
106
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.
108
108
109
109
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.
@@ -27,8 +27,8 @@ TanStack Table offers state and APIs helpful for implementing column pinning fea
27
27
There are 3 table features that can reorder columns, which happen in the following order:
28
28
29
29
1.**Column Pinning** - If pinning, columns are split into left, center (unpinned), and right pinned columns.
30
-
2. Manual [Column Ordering](../guide/column-ordering) - A manually specified column order is applied.
31
-
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.
30
+
2. Manual [Column Ordering](../column-ordering) - A manually specified column order is applied.
31
+
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.
32
32
33
33
The only way to change the order of the pinned columns is in the `columnPinning.left` and `columnPinning.right` state itself. `columnOrder` state will only affect the order of the unpinned ("center") columns.
34
34
@@ -77,13 +77,13 @@ const table = useReactTable({
77
77
78
78
There are a handful of useful Column API methods to help you implement column pinning features:
79
79
80
-
-[`column.getCanPin`](../api/features/column-pinning#getcanpin): Use to determine if a column can be pinned.
81
-
-[`column.pin`](../api/features/column-pinning#pin): Use to pin a column to the left or right. Or use to unpin a column.
82
-
-[`column.getIsPinned`](../api/features/column-pinning#getispinned): Use to determine where a column is pinned.
83
-
-[`column.getStart`](../api/features/column-pinning#getstart): Use to provide the correct `left` CSS value for a pinned column.
84
-
-[`column.getAfter`](../api/features/column-pinning#getafter): Use to provide the correct `right` CSS value for a pinned column.
85
-
-[`column.getIsLastColumn`](../api/features/column-pinning#getislastcolumn): Use to determine if a column is the last column in its pinned group. Useful for adding a box-shadow
86
-
-[`column.getIsFirstColumn`](../api/features/column-pinning#getisfirstcolumn): Use to determine if a column is the first column in its pinned group. Useful for adding a box-shadow
80
+
-[`column.getCanPin`](../../api/features/column-pinning#getcanpin): Use to determine if a column can be pinned.
81
+
-[`column.pin`](../../api/features/column-pinning#pin): Use to pin a column to the left or right. Or use to unpin a column.
82
+
-[`column.getIsPinned`](../../api/features/column-pinning#getispinned): Use to determine where a column is pinned.
83
+
-[`column.getStart`](../../api/features/column-pinning#getstart): Use to provide the correct `left` CSS value for a pinned column.
84
+
-[`column.getAfter`](../../api/features/column-pinning#getafter): Use to provide the correct `right` CSS value for a pinned column.
85
+
-[`column.getIsLastColumn`](../../api/features/column-pinning#getislastcolumn): Use to determine if a column is the last column in its pinned group. Useful for adding a box-shadow
86
+
-[`column.getIsFirstColumn`](../../api/features/column-pinning#getisfirstcolumn): Use to determine if a column is the first column in its pinned group. Useful for adding a box-shadow
@@ -166,7 +166,7 @@ TanStack Table keeps track of an state object called `columnSizingInfo` that you
166
166
167
167
If you are creating large or complex tables (and using React 😉), you may find that if you do not add proper memoization to your render logic, your users may experience degraded performance while resizing columns.
168
168
169
-
We have created a [performant column resizing example](../framework/react/examples/column-resizing-performant) that demonstrates how to achieve 60 fps column resizing renders with a complex table that may otherwise have slow renders. It is recommended that you just look at that example to see how it is done, but these are the basic things to keep in mind:
169
+
We have created a [performant column resizing example](../../framework/react/examples/column-resizing-performant) that demonstrates how to achieve 60 fps column resizing renders with a complex table that may otherwise have slow renders. It is recommended that you just look at that example to see how it is done, but these are the basic things to keep in mind:
170
170
171
171
1. Don't use `column.getSize()` on every header and every data cell. Instead, calculate all column widths once upfront, **memoized**!
172
172
2. Memoize your Table Body while resizing is in progress.
@@ -108,7 +108,7 @@ The `createCell` method in a table feature is responsible for adding methods to
108
108
109
109
Let's walk through making a custom table feature for a hypothetical use case. Let's say we want to add a feature to the table instance that allows the user to change the "density" (padding of cells) of the table.
110
110
111
-
Check out the full [custom-features](../framework/react/examples/custom-features) example to see the full implementation, but here's an in-depth look at the steps to create a custom feature.
111
+
Check out the full [custom-features](../../framework/react/examples/custom-features) example to see the full implementation, but here's an in-depth look at the steps to create a custom feature.
There are 3 table features that can reorder columns, which happen in the following order:
18
18
19
-
1.[Column Pinning](../guide/column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.
20
-
2. Manual [Column Ordering](../guide/column-ordering) - A manually specified column order is applied.
19
+
1.[Column Pinning](../column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.
20
+
2. Manual [Column Ordering](../column-ordering) - A manually specified column order is applied.
21
21
3.**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.
@@ -30,7 +30,7 @@ Using client-side pagination means that the `data` that you fetch will contain *
30
30
31
31
Client-side pagination is usually the simplest way to implement pagination when using TanStack Table, but it might not be practical for very large datasets.
32
32
33
-
However, a lot of people underestimate just how much data can be handled client-side. If your table will only ever have a few thousand rows or less, client-side pagination can still be a viable option. TanStack Table is designed to scale up to 10s of thousands of rows with decent performance for pagination, filtering, sorting, and grouping. The [official pagination example](../framework/react/examples/pagination) loads 100,000 rows and still performs well, albeit with only handful of columns.
33
+
However, a lot of people underestimate just how much data can be handled client-side. If your table will only ever have a few thousand rows or less, client-side pagination can still be a viable option. TanStack Table is designed to scale up to 10s of thousands of rows with decent performance for pagination, filtering, sorting, and grouping. The [official pagination example](../../framework/react/examples/pagination) loads 100,000 rows and still performs well, albeit with only handful of columns.
34
34
35
35
Every use-case is different and will depend on the complexity of the table, how many columns you have, how large every piece of data is, etc. The main bottlenecks to pay attention to are:
0 commit comments