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
Copy file name to clipboardExpand all lines: docs/guide/column-filtering.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ TanStack table supports both both client-side and manual server-side filtering.
31
31
32
32
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.
33
33
34
-
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 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.
34
+
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.
35
35
36
36
> 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.
37
37
@@ -59,7 +59,7 @@ const table = useReactTable({
59
59
})
60
60
```
61
61
62
-
> **Note:** When using manual filtering, many of the options that are discussed in the rest of this guide will have no effect. When is `manualFiltering` is set to `true`, the table instance will not apply any filtering logic to the rows that are passed to it. Instead, it will assume that the rows are already filtered and will use the `data` that you pass to it as-is.
62
+
> **Note:** When using manual filtering, many of the options that are discussed in the rest of this guide will have no effect. When `manualFiltering` is set to `true`, the table instance will not apply any filtering logic to the rows that are passed to it. Instead, it will assume that the rows are already filtered and will use the `data` that you pass to it as-is.
63
63
64
64
### Client-Side Filtering
65
65
@@ -217,8 +217,8 @@ const table = useReactTable({
217
217
data,
218
218
getCoreRowModel:getCoreRowModel(),
219
219
getFilteredRowModel:getFilteredRowModel(),
220
-
filterFns: { //add a custom sorting function
221
-
myCustomFilterFn: (row, columnId, filterValue) => { //defined inline here
220
+
filterFns: { //add a custom global filter function
221
+
myCustomFilterFn: (row, columnId, filterValue) => { //defined inline here
222
222
return// true or false based on your custom logic
223
223
},
224
224
startsWith: startsWithFilterFn, // defined elsewhere
@@ -334,4 +334,4 @@ There are a lot of Column and Table APIs that you can use to interact with the c
334
334
-`column.getFilterIndex` - Useful for displaying in what order the current filter is being applied
335
335
336
336
-`column.getAutoFilterFn` -
337
-
-`column.getFilterFn` - Useful for displaying which filter mode or function is currently being used
337
+
-`column.getFilterFn` - Useful for displaying which filter mode or function is currently being used
0 commit comments