Skip to content

Commit

Permalink
docs: fix some links and typos (#5390)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Mar 5, 2024
1 parent 9dde1cd commit 2ec0d29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"label": "Core Guides",
"children": [
{
"label": "Table State (React)",
"label": "Table State",
"to": "framework/react/guide/table-state"
}
]
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 @@ -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](../framework/react/examples/kitchen-sink)
- [fully controlled](../framework/react/examples/fully-controlled)

## Table State (React) Guide

Expand Down
4 changes: 2 additions & 2 deletions docs/guide/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ const table = useReactTable({

If you decide that you need to use server-side pagination, here is how you can implement it.

No pagination row model is needed for server-side pagination, but if you have provided it for other tables that do need it in a shared component, you can still turn off the client-side pagination by setting the `manualPagination` option to `true`. Setting to the `manualPagination` option to `true` will tell the table instance to use the `table.getPrePaginationRowModel` row model under the hood, and it will make the table instance assume that the `data` that you pass in is already paginated.
No pagination row model is needed for server-side pagination, but if you have provided it for other tables that do need it in a shared component, you can still turn off the client-side pagination by setting the `manualPagination` option to `true`. Setting the `manualPagination` option to `true` will tell the table instance to use the `table.getPrePaginationRowModel` row model under the hood, and it will make the table instance assume that the `data` that you pass in is already paginated.

#### Page Count and Row Count

Also, the table instance will have no way of knowing how many rows/pages there are in total in your back-end unless you tell it. Provide either the `rowCount` or `pageCount` table option to let the table instance know how many pages there are in total. If you provide a `rowCount`, the table instance will calculate the `pageCount` internally from `rowCount` and `pageSize`. Otherwise, you can directly provide the `pageCount` if you already have it. If you don't know the page count, you can just pass in `-1` for the `pageCount`, but the `getCanNextPage` and `getCanPreviousPage` row model functions will always return `true` in this case.
The table instance will have no way of knowing how many rows/pages there are in total in your back-end unless you tell it. Provide either the `rowCount` or `pageCount` table option to let the table instance know how many pages there are in total. If you provide a `rowCount`, the table instance will calculate the `pageCount` internally from `rowCount` and `pageSize`. Otherwise, you can directly provide the `pageCount` if you already have it. If you don't know the page count, you can just pass in `-1` for the `pageCount`, but the `getCanNextPage` and `getCanPreviousPage` row model functions will always return `true` in this case.

```jsx
import { useReactTable, getCoreRowModel, getPaginationRowModel } from '@tanstack/react-table';
Expand Down

0 comments on commit 2ec0d29

Please sign in to comment.