Commit 792fa94 1 parent d43cc94 commit 792fa94 Copy full SHA for 792fa94
File tree 2 files changed +34
-2
lines changed
packages/tanstack-table-search-params
2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ const table = useReactTable({
121
121
});
122
122
```
123
123
124
- ## Customization
124
+ ## Options
125
125
126
126
- [ Custom query param name] ( #custom-query-param-name )
127
127
- [ Custom encoder/decoder] ( #custom-encoderdecoder )
@@ -248,6 +248,22 @@ const stateAndOnChanges = useTableSearchParams(router, {
248
248
});
249
249
```
250
250
251
+ ### Debounce
252
+
253
+ You can debounce the reflection of state changes in the query parameters.
254
+
255
+ - [ demo] ( https://tanstack-table-search-paramsexample-git-56132d-taro28s-projects.vercel.app/debounce )
256
+ - [ code] ( https://github.com/taro-28/tanstack-table-search-params/tree/main/examples/next-pages-router/src/pages/debounce.tsx )
257
+
258
+ ``` tsx
259
+ const stateAndOnChanges = useTableSearchParams (router , {
260
+ debounceMilliseconds: {
261
+ // Debounce globalFilter by 500 milliseconds
262
+ globalFilter: 500 ,
263
+ },
264
+ });
265
+ ```
266
+
251
267
## Supported
252
268
253
269
List of supported TanStack table states
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ const table = useReactTable({
121
121
});
122
122
```
123
123
124
- ## Customization
124
+ ## Options
125
125
126
126
- [ Custom query param name] ( #custom-query-param-name )
127
127
- [ Custom encoder/decoder] ( #custom-encoderdecoder )
@@ -248,6 +248,22 @@ const stateAndOnChanges = useTableSearchParams(router, {
248
248
});
249
249
```
250
250
251
+ ### Debounce
252
+
253
+ You can debounce the reflection of state changes in the query parameters.
254
+
255
+ - [ demo] ( https://tanstack-table-search-paramsexample-git-56132d-taro28s-projects.vercel.app/debounce )
256
+ - [ code] ( https://github.com/taro-28/tanstack-table-search-params/tree/main/examples/next-pages-router/src/pages/debounce.tsx )
257
+
258
+ ``` tsx
259
+ const stateAndOnChanges = useTableSearchParams (router , {
260
+ debounceMilliseconds: {
261
+ // Debounce globalFilter by 500 milliseconds
262
+ globalFilter: 500 ,
263
+ },
264
+ });
265
+ ```
266
+
251
267
## Supported
252
268
253
269
List of supported TanStack table states
You can’t perform that action at this time.
0 commit comments