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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
* text=auto eol=lf
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Feature Requests & Questions
- name: πŸ€” Feature Requests & Questions
url: https://github.com/TanStack/table/discussions
about: Please ask and answer questions here.
- name: Community Chat
- name: πŸ’¬ Community Chat
url: https://discord.gg/mQd7egN
about: A dedicated discord server hosted by TanStack
- name: πŸ¦‹ TanStack Bluesky
url: https://bsky.app/profile/tanstack.com
about: Stay up to date with new releases of our libraries
8 changes: 8 additions & 0 deletions .github/pull_request_template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 🎯 Changes

<!-- What changes are made in this PR? Describe the change and its motivation. -->

## βœ… Checklist

- [ ] I have followed the steps in the [Contributing guide](https://github.com/TanStack/table/blob/main/CONTRIBUTING.md).
- [ ] I have tested this code locally with `pnpm test:pr`.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ jobs:
run: |
git config --global user.name 'Tanner Linsley'
git config --global user.email 'tannerlinsley@users.noreply.github.com'
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm run cipublish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
link-workspace-packages=true
prefer-workspace-packages=true
provenance=true
4 changes: 2 additions & 2 deletions docs/framework/react/guide/table-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ title: Table State (React) Guide

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

- [kitchen sink](../../examples/kitchen-sink)
- [fully controlled](../../examples/fully-controlled)
- [kitchen sink](../examples/kitchen-sink)
- [fully controlled](../examples/fully-controlled)

## Table State (React) Guide

Expand Down
6 changes: 3 additions & 3 deletions docs/guide/cells.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ title: Cells Guide

## API

[Cell API](../../api/core/cell)
[Cell API](../api/core/cell)

## Cells Guide

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

### Where to Get Cells From

Cells come from [Rows](../rows). Enough said, right?
Cells come from [Rows](./rows). Enough said, right?

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.

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

#### Cell Parent Objects

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

#### Access Cell Values

Expand Down
8 changes: 4 additions & 4 deletions docs/guide/column-defs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ title: Columns Definitions Guide

## API

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

## Column Definitions Guide

> 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.
> 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.
Column defs are the single most important part of building a table. They are responsible for:

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

## Column Def Types
Expand Down Expand Up @@ -276,7 +276,7 @@ columnHelper.accessor('firstName', {

## Aggregated Cell Formatting

For more info on aggregated cells, see [grouping](../grouping).
For more info on aggregated cells, see [grouping](./grouping).

## Header & Footer Formatting

Expand Down
4 changes: 2 additions & 2 deletions docs/guide/column-faceting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ title: Column Faceting Guide

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

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

## API

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

## Column Faceting Guide

Expand Down
20 changes: 10 additions & 10 deletions docs/guide/column-filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ title: Column Filtering Guide

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

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

## API

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

## Column Filtering Guide

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

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.

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.
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.

> 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.
Expand Down
12 changes: 6 additions & 6 deletions docs/guide/column-ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ title: Column Ordering Guide

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

- [column-ordering](../../framework/react/examples/column-ordering)
- [column-dnd](../../framework/react/examples/column-dnd)
- [column-ordering](../framework/react/examples/column-ordering)
- [column-dnd](../framework/react/examples/column-dnd)

## API

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

## Column Ordering Guide

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

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

1. [Column Pinning](../column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.
1. [Column Pinning](./column-pinning) - If pinning, columns are split into left, center (unpinned), and right pinned columns.
2. Manual **Column Ordering** - A manually specified column order is applied.
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.
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.

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

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.

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.
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.

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.

Expand Down
28 changes: 14 additions & 14 deletions docs/guide/column-pinning.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ title: Column Pinning Guide

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

- [column-pinning](../../framework/react/examples/column-pinning)
- [sticky-column-pinning](../../framework/react/examples/column-pinning-sticky)
- [column-pinning](../framework/react/examples/column-pinning)
- [sticky-column-pinning](../framework/react/examples/column-pinning-sticky)

### Other Examples

- [Svelte column-pinning](../../framework/svelte/examples/column-pinning)
- [Vue column-pinning](../../framework/vue/examples/column-pinning)
- [Svelte column-pinning](../framework/svelte/examples/column-pinning)
- [Vue column-pinning](../framework/vue/examples/column-pinning)

## API

[Column Pinning API](../../api/features/column-pinning)
[Column Pinning API](../api/features/column-pinning)

## Column Pinning Guide

Expand All @@ -27,8 +27,8 @@ TanStack Table offers state and APIs helpful for implementing column pinning fea
There are 3 table features that can reorder columns, which happen in the following order:

1. **Column Pinning** - If pinning, columns are split into left, center (unpinned), and right pinned columns.
2. Manual [Column Ordering](../column-ordering) - A manually specified column order is applied.
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.
2. Manual [Column Ordering](./column-ordering) - A manually specified column order is applied.
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.

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.

Expand Down Expand Up @@ -77,13 +77,13 @@ const table = useTable({

There are a handful of useful Column API methods to help you implement column pinning features:

- [`column.getCanPin`](../../api/features/column-pinning#getcanpin): Use to determine if a column can be pinned.
- [`column.pin`](../../api/features/column-pinning#pin): Use to pin a column to the left or right. Or use to unpin a column.
- [`column.getIsPinned`](../../api/features/column-pinning#getispinned): Use to determine where a column is pinned.
- [`column.getStart`](../../api/features/column-pinning#getstart): Use to provide the correct `left` CSS value for a pinned column.
- [`column.getAfter`](../../api/features/column-pinning#getafter): Use to provide the correct `right` CSS value for a pinned column.
- [`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
- [`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
- [`column.getCanPin`](../api/features/column-pinning#getcanpin): Use to determine if a column can be pinned.
- [`column.pin`](../api/features/column-pinning#pin): Use to pin a column to the left or right. Or use to unpin a column.
- [`column.getIsPinned`](../api/features/column-pinning#getispinned): Use to determine where a column is pinned.
- [`column.getStart`](../api/features/column-pinning#getstart): Use to provide the correct `left` CSS value for a pinned column.
- [`column.getAfter`](../api/features/column-pinning#getafter): Use to provide the correct `right` CSS value for a pinned column.
- [`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
- [`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

### Split Table Column Pinning

Expand Down
8 changes: 4 additions & 4 deletions docs/guide/column-sizing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ title: Column Sizing Guide

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

- [column-sizing](../../framework/react/examples/column-sizing)
- [column-resizing-performant](../../framework/react/examples/column-resizing-performant)
- [column-sizing](../framework/react/examples/column-sizing)
- [column-resizing-performant](../framework/react/examples/column-resizing-performant)

## API

[Column Sizing API](../../api/features/column-sizing)
[Column Sizing API](../api/features/column-sizing)

## Column Sizing Guide

Expand Down Expand Up @@ -166,7 +166,7 @@ TanStack Table keeps track of an state object called `columnSizingInfo` that you

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.

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:
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:

1. Don't use `column.getSize()` on every header and every data cell. Instead, calculate all column widths once upfront, **memoized**!
2. Memoize your Table Body while resizing is in progress.
Expand Down
12 changes: 6 additions & 6 deletions docs/guide/column-visibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ title: Column Visibility Guide

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

- [column-visibility](../../framework/react/examples/column-visibility)
- [column-ordering](../../framework/react/examples/column-ordering)
- [sticky-column-pinning](../../framework/react/examples/column-pinning-sticky)
- [column-visibility](../framework/react/examples/column-visibility)
- [column-ordering](../framework/react/examples/column-ordering)
- [sticky-column-pinning](../framework/react/examples/column-pinning-sticky)

### Other Examples

- [SolidJS column-visibility](../../framework/solid/examples/column-visibility)
- [Svelte column-visibility](../../framework/svelte/examples/column-visibility)
- [SolidJS column-visibility](../framework/solid/examples/column-visibility)
- [Svelte column-visibility](../framework/svelte/examples/column-visibility)

## API

[Column Visibility API](../../api/features/column-visibility)
[Column Visibility API](../api/features/column-visibility)

## Column Visibility Guide

Expand Down
Loading
Loading