Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(guides/routing): update Page interface and add link to API reference #8941

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/content/docs/en/guides/routing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ interface Page<T = any> {
total: number;
/** the current page number, starting from 1 */
currentPage: number;
/** number of items per page (default: 25) */
/** number of items per page (default: 10) */
size: number;
/** number of last page */
lastPage: number;
Expand All @@ -418,10 +418,16 @@ interface Page<T = any> {
prev: string | undefined;
/** url of the next page (if there is one) */
next: string | undefined;
/** url of the first page (if the current page is not the first page) */
first: string | undefined;
/** url of the next page (if the current page in not the last page) */
last: string | undefined;
};
}
```

<ReadMore>Learn more about [`page` prop](/en/reference/api-reference/#the-pagination-page-prop).</ReadMore>

### Nested Pagination

A more advanced use-case for pagination is **nested pagination.** This is when pagination is combined with other dynamic route params. You can use nested pagination to group your paginated collection by some property or tag.
Expand Down
Loading