From 0f86b3caf663e08dd370b7d60861f7c9a653e680 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 29 Jul 2024 15:38:34 +0200 Subject: [PATCH] fix(guides/routing): update Page interface and add link to API ref Closes: #8929 --- src/content/docs/en/guides/routing.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/content/docs/en/guides/routing.mdx b/src/content/docs/en/guides/routing.mdx index 85cb6803169e9..d2ea9e2008051 100644 --- a/src/content/docs/en/guides/routing.mdx +++ b/src/content/docs/en/guides/routing.mdx @@ -407,7 +407,7 @@ interface Page { 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; @@ -418,10 +418,16 @@ interface Page { 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; }; } ``` +Learn more about [`page` prop](/en/reference/api-reference/#the-pagination-page-prop). + ### 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.