Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TanStack/table
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.11.3
Choose a base ref
...
head repository: TanStack/table
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v8.11.4
Choose a head ref
  • 14 commits
  • 101 files changed
  • 6 contributors

Commits on Jan 3, 2024

  1. Copy the full SHA
    80d92d6 View commit details

Commits on Jan 4, 2024

  1. docs: refactor guides section and new table instance guide (#5254)

    * update readme
    
    * refactor guide section, table instance guide
    
    * prettier
    KevinVandy authored Jan 4, 2024
    Copy the full SHA
    b327934 View commit details
  2. Copy the full SHA
    8a14fa6 View commit details
  3. ci: Use publish function from @tanstack/config (#5257)

    * feat: Use publish function from @tanstack/config
    
    * Run script
    
    * Update lockfile
    
    * Update semver range
    
    * Update @tanstack/config
    
    * Remove unused types
    lachlancollins authored Jan 4, 2024
    Copy the full SHA
    43989f2 View commit details
  4. docs: fix meta data example (#5256)

    * docs: fix meta data example
    
    * Update column-def.md
    
    ---------
    
    Co-authored-by: Kevin Van Cott <kevinvandy656@gmail.com>
    Nathan Isaac and KevinVandy authored Jan 4, 2024
    Copy the full SHA
    6561267 View commit details

Commits on Jan 5, 2024

  1. chore: Update select workspace dependencies (#5258)

    * chore: Update workspace dependencies
    
    * Bump more deps
    lachlancollins authored Jan 5, 2024
    Copy the full SHA
    a990435 View commit details
  2. chore: Update examples to use Vite v4 (#5259)

    * Update to vite v4
    
    * Updated emotion semver range
    lachlancollins authored Jan 5, 2024
    Copy the full SHA
    5d615ab View commit details
  3. chore: Update to Rollup v4, Vite v5 (#5260)

    * chore: Update to Rollup v4, Vite v5
    
    * Bump testing libs
    lachlancollins authored Jan 5, 2024
    Copy the full SHA
    fefe74f View commit details
  4. fix: Correctly exit publish script (#5262)

    * fix: Correctly exit publish script
    
    * Bump @tanstack/config
    
    * Remove try/catch
    lachlancollins authored Jan 5, 2024
    Copy the full SHA
    57336fc View commit details

Commits on Jan 6, 2024

  1. chore: Stricter tsconfig options (#5264)

    * Re-order tsconfig options
    
    * Add more options
    
    * Even more options
    
    * Remove unnecessary options
    
    * Move jsx config out of root
    
    * Remove unnecessary scripts/tsconfig.json
    lachlancollins authored Jan 6, 2024
    Copy the full SHA
    86d6447 View commit details
  2. Copy the full SHA
    0899c33 View commit details

Commits on Jan 11, 2024

  1. Copy the full SHA
    8e106a9 View commit details
  2. Copy the full SHA
    9aba3c0 View commit details
  3. release: v8.11.4

    tannerlinsley committed Jan 11, 2024
    Copy the full SHA
    660641a View commit details
Showing with 3,048 additions and 3,982 deletions.
  1. +1 −1 .nvmrc
  2. +28 −70 README.md
  3. +2 −2 docs/api/core/column-def.md
  4. +2 −2 docs/api/core/header.md
  5. +1 −1 docs/api/core/row.md
  6. +30 −6 docs/config.json
  7. +24 −0 docs/guide/column-filtering.md
  8. +1 −1 docs/guide/column-ordering.md
  9. +22 −0 docs/guide/column-pinning.md
  10. +1 −1 docs/guide/column-sizing.md
  11. +2 −0 docs/guide/column-visibility.md
  12. +2 −0 docs/guide/expanding.md
  13. +15 −0 docs/guide/faceted-values.md
  14. +8 −5 docs/guide/features.md
  15. +6 −23 docs/guide/filters.md
  16. +16 −0 docs/guide/fuzzy-filtering.md
  17. +19 −0 docs/guide/global-filtering.md
  18. +1 −1 docs/guide/grouping.md
  19. +2 −0 docs/guide/headers.md
  20. +2 −0 docs/guide/pagination.md
  21. +4 −21 docs/guide/pinning.md
  22. +3 −0 docs/guide/row-models.md
  23. +20 −0 docs/guide/row-pinning.md
  24. +1 −1 docs/guide/row-selection.md
  25. +2 −0 docs/guide/sorting.md
  26. +122 −0 docs/guide/tables.md
  27. +1 −1 docs/guide/virtualization.md
  28. +4 −4 examples/react/basic/package.json
  29. +4 −4 examples/react/bootstrap/package.json
  30. +4 −4 examples/react/column-dnd/package.json
  31. +4 −4 examples/react/column-groups/package.json
  32. +4 −4 examples/react/column-ordering/package.json
  33. +4 −4 examples/react/column-pinning/package.json
  34. +4 −4 examples/react/column-resizing-performant/package.json
  35. +4 −4 examples/react/column-sizing/package.json
  36. +4 −4 examples/react/column-visibility/package.json
  37. +4 −4 examples/react/editable-data/package.json
  38. +4 −4 examples/react/expanding/package.json
  39. +5 −5 examples/react/filters/package.json
  40. +4 −4 examples/react/full-width-resizable-table/package.json
  41. +4 −4 examples/react/full-width-table/package.json
  42. +4 −4 examples/react/fully-controlled/package.json
  43. +4 −4 examples/react/grouping/package.json
  44. +7 −7 examples/react/kitchen-sink/package.json
  45. +6 −6 examples/react/material-ui-pagination/package.json
  46. +4 −4 examples/react/pagination-controlled/package.json
  47. +4 −4 examples/react/pagination/package.json
  48. +4 −4 examples/react/row-dnd/package.json
  49. +4 −4 examples/react/row-pinning/package.json
  50. +4 −4 examples/react/row-selection/package.json
  51. +4 −4 examples/react/sorting/package.json
  52. +4 −4 examples/react/sub-components/package.json
  53. +1 −1 examples/react/virtualized-columns/package.json
  54. +4 −4 examples/react/virtualized-infinite-scrolling/package.json
  55. +1 −1 examples/react/virtualized-rows/package.json
  56. +3 −3 examples/solid/basic/package.json
  57. +4 −4 examples/solid/bootstrap/package.json
  58. +3 −3 examples/solid/column-groups/package.json
  59. +3 −3 examples/solid/column-ordering/package.json
  60. +3 −3 examples/solid/column-visibility/package.json
  61. +2 −0 examples/solid/filters/.gitignore
  62. +6 −0 examples/solid/filters/README.md
  63. +16 −0 examples/solid/filters/index.html
  64. +23 −0 examples/solid/filters/package.json
  65. +173 −0 examples/solid/filters/src/App.tsx
  66. +95 −0 examples/solid/filters/src/ColumnFilter.tsx
  67. +26 −0 examples/solid/filters/src/index.css
  68. +7 −0 examples/solid/filters/src/index.tsx
  69. +48 −0 examples/solid/filters/src/makeData.ts
  70. +13 −0 examples/solid/filters/tsconfig.dev.json
  71. +10 −0 examples/solid/filters/vite.config.ts
  72. +3 −3 examples/solid/sorting/package.json
  73. +7 −8 examples/svelte/basic/package.json
  74. +7 −8 examples/svelte/column-groups/package.json
  75. +7 −8 examples/svelte/column-ordering/package.json
  76. +7 −8 examples/svelte/column-pinning/package.json
  77. +7 −8 examples/svelte/column-visibility/package.json
  78. +7 −8 examples/svelte/sorting/package.json
  79. +5 −5 examples/vue/basic/package.json
  80. +5 −5 examples/vue/column-ordering/package.json
  81. +5 −5 examples/vue/column-pinning/package.json
  82. +5 −5 examples/vue/pagination-controlled/package.json
  83. +5 −5 examples/vue/pagination/package.json
  84. +4 −4 examples/vue/row-selection/package.json
  85. +5 −5 examples/vue/sorting/package.json
  86. +23 −38 package.json
  87. +1 −1 packages/react-table-devtools/package.json
  88. +1 −0 packages/react-table-devtools/tsconfig.json
  89. +1 −1 packages/react-table/package.json
  90. +1 −0 packages/react-table/tsconfig.json
  91. +1 −1 packages/solid-table/package.json
  92. +2 −0 packages/solid-table/tsconfig.json
  93. +1 −1 packages/svelte-table/package.json
  94. +1 −1 packages/table-core/package.json
  95. +22 −10 packages/table-core/src/features/ColumnSizing.ts
  96. +1 −1 packages/vue-table/package.json
  97. +2,001 −3,054 pnpm-lock.yaml
  98. +2 −2 scripts/getRollupConfig.js
  99. +9 −476 scripts/publish.js
  100. +0 −36 scripts/types.d.ts
  101. +17 −11 tsconfig.json
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.16.0
v18.19.0
98 changes: 28 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,27 +6,41 @@ Headless UI for building **powerful tables & datagrids** for **React, Solid, Vue

<a href="https://twitter.com/intent/tweet?button_hashtag=TanStack" target="\_parent">
<img alt="#TanStack" src="https://img.shields.io/twitter/url?color=%2308a0e9&label=%23TanStack&style=social&url=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Fbutton_hashtag%3DTanStack" />
</a><a href="https://github.com/tanstack/table/actions?table=workflow%3A%22react-table+tests%22">
<img src="https://github.com/tanstack/table/workflows/react-table%20tests/badge.svg" />
</a><a href="https://npmjs.com/package/@tanstack/react-table" target="\_parent">
</a>
<a href="https://github.com/tanstack/table/actions?table=workflow%3A%22react-table+tests%22">
<img src="https://github.com/tanstack/table/workflows/react-table%20tests/badge.svg" />
</a>
<a href="https://npmjs.com/package/@tanstack/react-table" target="\_parent">
<img alt="" src="https://img.shields.io/npm/dm/@tanstack/react-table.svg" />
</a><a href="https://bundlephobia.com/result?p=@tanstack/react-table@latest" target="\_parent">
</a>
<a href="https://bundlephobia.com/result?p=@tanstack/react-table@latest" target="\_parent">
<img alt="" src="https://badgen.net/bundlephobia/minzip/@tanstack/react-table@latest" />
</a><a href="#badge">
<img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg">
</a><a href="https://github.com/tanstack/table/discussions">
</a>
<a href="#badge">
<img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg">
</a>
<a href="https://github.com/tanstack/table/discussions">
<img alt="Join the discussion on Github" src="https://img.shields.io/badge/Github%20Discussions%20%26%20Support-Chat%20now!-blue" />
</a><a href="https://github.com/tanstack/table" target="\_parent">
</a>
<a href="https://github.com/tanstack/table" target="\_parent">
<img alt="" src="https://img.shields.io/github/stars/tanstack/react-table.svg?style=social&label=Star" />
</a><a href="https://twitter.com/tannerlinsley" target="\_parent">
</a>
<a href="https://twitter.com/tannerlinsley" target="\_parent">
<img alt="" src="https://img.shields.io/twitter/follow/tannerlinsley.svg?style=social&label=Follow" />
</a>

> [Looking for version 7 of `react-table`? Click here!](https://github.com/tanstack/table/tree/v7)
## Enjoy this library?

Try some other [TanStack](https://tanstack.com) like [React Query](https://github.com/TanStack/query), [React Form](https://github.com/tannerlinsley/react-form), [React Charts](https://github.com/TanStack/react-charts)
Try other [TanStack](https://tanstack.com) libraries:

- [TanStack Query](https://github.com/TanStack/query) <img alt="" src="https://img.shields.io/github/stars/tanstack/query.svg" />
- [TanStack Table](https://github.com/TanStack/table) <img alt="" src="https://img.shields.io/github/stars/tanstack/table.svg" />
- [TanStack Router](https://github.com/TanStack/router) <img alt="" src="https://img.shields.io/github/stars/tanstack/router.svg" />
- [TanStack Virtual](https://github.com/TanStack/virtual) <img alt="" src="https://img.shields.io/github/stars/tanstack/virtual.svg" />
- [TanStack Form](https://github.com/TanStack/form) <img alt="" src="https://img.shields.io/github/stars/tanstack/form.svg" />
- [TanStack Ranger](https://github.com/TanStack/ranger) <img alt="" src="https://img.shields.io/github/stars/tanstack/ranger.svg" />

## Visit [tanstack.com/table](https://tanstack.com/table) for docs, guides, API and more!

@@ -55,7 +69,7 @@ JS/TS ecosystem and every use-case.

- Agnostic core (JS/TS)
- 1st-class framework bindings for React, Vue, Solid
- ~14kb or less (with tree-shaking)
- ~15kb or less (with tree-shaking)
- 100% TypeScript (but not required)
- Headless (100% customizable, Bring-your-own-UI)
- Auto out of the box, opt-in controllable state
@@ -92,73 +106,18 @@ There are a fair amount of breaking changes (they're worth it, trust us!):
- Plugin system has been removed so plugins must be rewritten to wrap/compose the new functional API. Contact us if you need help!
- Column configuration options have changed, but only slightly.
- Table options are mostly the same, with some larger changes around optional state management/control and data pipeline control
- The `tableInstance` while similar in spirit to v7 has been reconfigured to be much faster.

## Todo (in order of priority)

- [x] Rewrite Core
- [x] Core
- [x] Columns
- [x] Headers
- [x] Visibility
- [x] Pinning
- [x] Filters
- [x] Sorting
- [x] Grouping
- [x] Expanding
- [x] Column Sizing
- [x] Pagination
- [x] Row Selection
- [ ] Migrate [Examples](https://github.com/tanstack/table/tree/main/examples)
- [x] column-visibility
- [x] column-ordering
- [x] column-pinning
- [x] basic
- [x] filters
- [x] sorting
- [x] pagination
- [x] pagination-controlled
- [x] column-sizing
- [x] row-selection
- [x] expanding
- [x] grouping-and-aggregation
- [x] editable-data
- [ ] kitchen-sink
- [x] row-dnd
- [ ] streaming-rows
- [x] sub-components
- [x] virtualized-rows
- [ ] absolute-layout
- [ ] block-layout
- [ ] animated-framer-motion
- [x] bootstrap
- [ ] bootstrap-ui-components
- [ ] data-driven-classes-and-styles
- [x] full-width-resizable-table
- [x] full-width-table
- [ ] material-ui-components
- [ ] material-UI-enhanced-table
- The `table` instance while similar in spirit to v7 has been reconfigured to be much faster.

## Installation

Install one of the following packages based on your framework of choice:

```bash
# Npm
npm install @tanstack/react-table
npm install @tanstack/solid-table
npm install @tanstack/vue-table
npm install @tanstack/svelte-table

#pnpm
pnpm install @tanstack/react-table
pnpm install @tanstack/solid-table
pnpm install @tanstack/vue-table
pnpm install @tanstack/svelte-table

#Yarn
yarn add @tanstack/react-table
yarn add @tanstack/solid-table
yarn add @tanstack/vue-table
yarn add @tanstack/svelte-table
```

## How to help?
@@ -168,7 +127,6 @@ yarn add @tanstack/svelte-table
- Introspect the types! Even without the docs finished, the library ships with 100% typescript to help you explore its capabilities.
- [Read the contribution guidelines](https://github.com/tanstack/table/tree/main/CONTRIBUTING.md)
- Write some docs! Start with the [API docs](https://github.com/TanStack/react-table/tree/main/docs/api) and try adding some information about one or more of the features. The types do a decent job of showing what's supported and the capabilities of the library.
- Try your hand at migrating an example to v8! The todo list for the examples is above!
- **Using a plugin?** Try rewriting your plugin (v8 doesn't have a plugin system any more) as a functional wrapper that uses TanStack Table internally. The new API is much more powerful and easier to compose. If you find something you can't figure out, let us know and we'll add it to the API.

### [Become a Sponsor](https://github.com/sponsors/tannerlinsley/)
4 changes: 2 additions & 2 deletions docs/api/core/column-def.md
Original file line number Diff line number Diff line change
@@ -95,9 +95,9 @@ meta?: ColumnMeta // This interface is extensible via declaration merging. See b
The meta data to associated with the column. We can access it anywhere when the column is available via `column.columnDef.meta`. This type is global to all tables and can be extended like so:

```tsx
import '@tanstack/react-table'
import '@tanstack/react-table' //or vue, svelte, solid, etc.
declare module '@tanstack/table-core' {
declare module '@tanstack/react-table' {
interface ColumnMeta<TData extends RowData, TValue> {
foo: string
}
4 changes: 2 additions & 2 deletions docs/api/core/header.md
Original file line number Diff line number Diff line change
@@ -38,15 +38,15 @@ The depth of the header, zero-indexed based.
column: Column<TData>
```

The header's associated [Column](./column.md) object
The header's associated [Column](./column) object

### `headerGroup`

```tsx
headerGroup: HeaderGroup<TData>
```

The header's associated [HeaderGroup](./header-group.md) object
The header's associated [HeaderGroup](./header-group) object

### `subHeaders`

2 changes: 1 addition & 1 deletion docs/api/core/row.md
Original file line number Diff line number Diff line change
@@ -120,4 +120,4 @@ An array of the original subRows as returned by the `options.getSubRows` option.
type getAllCells = () => Cell<TData>[]
```
Returns all of the [Cells](./cell.md) for the row.
Returns all of the [Cells](./cell) for the row.
36 changes: 30 additions & 6 deletions docs/config.json
Original file line number Diff line number Diff line change
@@ -49,13 +49,17 @@
"label": "Migrating to V8",
"to": "guide/migrating"
},
{
"label": "Tables (Getting Started)",
"to": "guide/tables"
},
{
"label": "Column Defs",
"to": "guide/column-defs"
},
{
"label": "Tables",
"to": "guide/tables"
"label": "Rows Models",
"to": "guide/row-models"
},
{
"label": "Rows",
@@ -77,6 +81,10 @@
"label": "Column Ordering",
"to": "guide/column-ordering"
},
{
"label": "Column Pinning",
"to": "guide/column-pinning"
},
{
"label": "Column Sizing",
"to": "guide/column-sizing"
@@ -86,8 +94,20 @@
"to": "guide/column-visibility"
},
{
"label": "Filters",
"to": "guide/filters"
"label": "Column Filtering",
"to": "guide/column-filtering"
},
{
"label": "Global Filtering",
"to": "guide/global-filtering"
},
{
"label": "Fuzzy Filtering",
"to": "guide/fuzzy-filtering"
},
{
"label": "Faceted Values",
"to": "guide/faceted-values"
},
{
"label": "Sorting",
@@ -106,8 +126,8 @@
"to": "guide/pagination"
},
{
"label": "Pinning",
"to": "guide/pinning"
"label": "Row Pinning",
"to": "guide/row-pinning"
},
{
"label": "Row Selection",
@@ -326,6 +346,10 @@
"to": "examples/solid/column-visibility",
"label": "Column Visibility"
},
{
"to": "examples/solid/filters",
"label": "Filters"
},
{
"to": "examples/solid/sorting",
"label": "Sorting"
24 changes: 24 additions & 0 deletions docs/guide/column-filtering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Column Filtering
---

## Examples

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

- [filters](../examples/react/filters) (includes faceting)
- [editable-data](../examples/react/editable-data)
- [expanding](../examples/react/expanding)
- [grouping](../examples/react/grouping)
- [pagination](../examples/react/pagination)
- [row-selection](../examples/react/row-selection)

## API

[Filters API](../api/features/filters)

## Column Filtering Guide

Filtering comes in 2 flavors: Column Filtering and Global Filtering.

This guide will focus on column filtering, which is a filter that is applied to a single column's accessor value.
2 changes: 1 addition & 1 deletion docs/guide/column-ordering.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ Want to skip to the implementation? Check out these examples:

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

## Overview
## Column Ordering Guide

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

22 changes: 22 additions & 0 deletions docs/guide/column-pinning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Column Pinning
---

## Examples

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

- [column-pinning](../examples/react/column-pinning)
- [row-pinning](../examples/react/row-pinning)

## API

[Pinning API](../api/features/pinning)

## Column Pinning Guide

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](../guide/column-ordering) - A manually specified column order is applied.
3. [Grouping](../guide/grouping) - If grouping is enabled, a grouping state is active, and `tableOptions.columnGroupingMode` is set to `'reorder' | 'remove'`, then the grouped columns are reordered to the start of the column flow.
2 changes: 1 addition & 1 deletion docs/guide/column-sizing.md
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ Want to skip to the implementation? Check out these examples:

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

## Guide
## Column Sizing Guide

The column sizing feature allows you to optionally specify the width of each column including min and max widths. It also allows you and your users the ability to dynamically change the width of all columns at will, eg. by dragging the column headers.

2 changes: 2 additions & 0 deletions docs/guide/column-visibility.md
Original file line number Diff line number Diff line change
@@ -12,3 +12,5 @@ Want to skip to the implementation? Check out these examples:
## API

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

## Column Visibility Guide
2 changes: 2 additions & 0 deletions docs/guide/expanding.md
Original file line number Diff line number Diff line change
@@ -12,3 +12,5 @@ Want to skip to the implementation? Check out these examples:
## API

[Expanding API](../api/features/expanding)

## Expanding Feature Guide
15 changes: 15 additions & 0 deletions docs/guide/faceted-values.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Faceted Values
---

## Examples

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

- [filters](../examples/react/filters) (includes faceting)

## API

[Filters API](../api/features/filters)

## Faceted Values Guide
13 changes: 8 additions & 5 deletions docs/guide/features.md
Original file line number Diff line number Diff line change
@@ -4,13 +4,16 @@ title: Features

TanStack Table comes with many features, each with their own associated options and API:

- [Column Visibility](./guide/column-visibility)
- [Column Ordering](./guide/column-ordering)
- [Column Pinning](./guide/column-pinning)
- [Column Sizing](./guide/column-sizing)
- [Filters](./guide/filters)
- [Sorting](./guide/sorting)
- [Grouping](./guide/grouping)
- [Column Visibility](./guide/column-visibility)
- [Expanding](./guide/expanding)
- [Row Selection](./guide/row-selection)
- [Column Filtering](./guide/column-filtering)
- [Global Filtering](./guide/global-filtering)
- [Grouping](./guide/grouping)
- [Pagination](./guide/pagination)
- [Row Pinning](./guide/row-pinning)
- [Row Selection](./guide/row-selection)
- [Sorting](./guide/sorting)
- [Virtualization](./guide/virtualization)
Loading