Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix/angular-table-fle…
Browse files Browse the repository at this point in the history
…x-render-no-update-content
  • Loading branch information
riccardoperra committed Jun 29, 2024
2 parents a60caf7 + 78b9012 commit f03fd09
Show file tree
Hide file tree
Showing 90 changed files with 11,402 additions and 3,238 deletions.
2 changes: 1 addition & 1 deletion docs/api/core/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ declare module '@tanstack/table-core' {
}
```

> 🧠 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).
> 🧠 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).
### `state`

Expand Down
8 changes: 8 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@
{
"to": "framework/react/examples/custom-features",
"label": "Custom Features"
},
{
"to": "framework/react/examples/query-router-search-params",
"label": "Query Router Search Params"
}
]
},
Expand Down Expand Up @@ -712,6 +716,10 @@
{
"to": "framework/vue/examples/sorting",
"label": "Sorting"
},
{
"to": "framework/vue/examples/sub-components",
"label": "Sub Components"
}
]
}
Expand Down
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 @@ -131,7 +131,7 @@ table.setOptions(prev => ({

### On State Change Callbacks

So far, we have seen the `on[State]Change` and `onStateChange` table options work to "hoist" the table state changes into our own state management. However, there are a few things about these using these options that you should be aware of.
So far, we have seen the `on[State]Change` and `onStateChange` table options work to "hoist" the table state changes into our own state management. However, there are a few things about using these options that you should be aware of.

#### 1. **State Change Callbacks MUST have their corresponding state value in the `state` option**.

Expand Down Expand Up @@ -201,4 +201,4 @@ const [sorting, setSorting] = React.useState<SortingState[]>([
desc: true,
}
])
```
```
2 changes: 1 addition & 1 deletion docs/guide/column-filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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.

TanStack table supports both both client-side and manual server-side filtering. This guide will go over how to implement and customize both, and help you decide which one is best for your use-case.
TanStack table supports both client-side and manual server-side filtering. This guide will go over how to implement and customize both, and help you decide which one is best for your use-case.

### Client-Side vs Server-Side Filtering

Expand Down
2 changes: 1 addition & 1 deletion examples/angular/filters/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@if (!header.isPlaceholder) {
<div
[ngClass]="{
'cursor-pointer select-none': header.column.getCanSort()
'cursor-pointer select-none': header.column.getCanSort(),
}"
>
<ng-container
Expand Down
4 changes: 2 additions & 2 deletions examples/qwik/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"preview": "serve dist"
},
"devDependencies": {
"@builder.io/qwik": "^1.5.2",
"@builder.io/qwik": "^1.6.0",
"serve": "^14.2.3",
"typescript": "5.4.5",
"vite": "^5.2.10"
Expand Down
4 changes: 2 additions & 2 deletions examples/qwik/filters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"preview": "serve dist"
},
"devDependencies": {
"@builder.io/qwik": "^1.5.2",
"@builder.io/qwik": "^1.6.0",
"@faker-js/faker": "^8.4.1",
"serve": "^14.2.3",
"typescript": "5.4.5",
Expand Down
4 changes: 2 additions & 2 deletions examples/qwik/row-selection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"preview": "serve dist"
},
"devDependencies": {
"@builder.io/qwik": "^1.5.2",
"@builder.io/qwik": "^1.6.0",
"@faker-js/faker": "^8.4.1",
"serve": "^14.2.3",
"typescript": "5.4.5",
Expand Down
4 changes: 2 additions & 2 deletions examples/qwik/sorting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"preview": "serve dist"
},
"devDependencies": {
"@builder.io/qwik": "^1.5.2",
"@builder.io/qwik": "^1.6.0",
"@faker-js/faker": "^8.4.1",
"serve": "^14.2.3",
"typescript": "5.4.5",
Expand Down
5 changes: 5 additions & 0 deletions examples/react/query-router-search-params/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
6 changes: 6 additions & 0 deletions examples/react/query-router-search-params/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Example

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
13 changes: 13 additions & 0 deletions examples/react/query-router-search-params/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script type="module" src="https://cdn.skypack.dev/twind/shim"></script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
28 changes: 28 additions & 0 deletions examples/react/query-router-search-params/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "tanstack-table-example-query-router-search-params",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"start": "vite"
},
"dependencies": {
"@tanstack/react-query": "^5.32.0",
"@tanstack/react-router": "^1.36.3",
"@tanstack/react-table": "^8.17.3",
"react": "^18.3.0",
"react-dom": "^18.3.0"
},
"devDependencies": {
"@faker-js/faker": "^8.4.1",
"@tanstack/router-vite-plugin": "^1.37.0",
"@rollup/plugin-replace": "^5.0.5",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "5.4.5",
"vite": "^5.2.10"
}
}
21 changes: 21 additions & 0 deletions examples/react/query-router-search-params/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { createRouter, RouterProvider } from '@tanstack/react-router'
import { routeTree } from './routeTree.gen'

const router = createRouter({ routeTree })

declare module '@tanstack/react-router' {
interface Register {
router: typeof router
}
}

const queryClient = new QueryClient()

export default function App() {
return (
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
</QueryClientProvider>
)
}
Loading

0 comments on commit f03fd09

Please sign in to comment.