Skip to content

Commit

Permalink
fix(guides/routing): update Page interface and add link to API ref
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmandPhilippot committed Jul 29, 2024
1 parent d1f2ce4 commit 0f86b3c
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit 0f86b3c

Please sign in to comment.