From 0f86b3caf663e08dd370b7d60861f7c9a653e680 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 29 Jul 2024 15:38:34 +0200 Subject: [PATCH 1/2] 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. From 0f414a4e09cd2efdadfbe699c632482f953448d3 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger Date: Mon, 29 Jul 2024 14:02:27 -0300 Subject: [PATCH 2/2] more explicit link text --- src/content/docs/en/guides/routing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/guides/routing.mdx b/src/content/docs/en/guides/routing.mdx index d2ea9e2008051..e2a7c46928ff7 100644 --- a/src/content/docs/en/guides/routing.mdx +++ b/src/content/docs/en/guides/routing.mdx @@ -426,7 +426,7 @@ interface Page { } ``` -Learn more about [`page` prop](/en/reference/api-reference/#the-pagination-page-prop). +Learn more about [the pagination `page` prop](/en/reference/api-reference/#the-pagination-page-prop). ### Nested Pagination