summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGravatar Tony @ Navillus <60468564+tony-navillus@users.noreply.github.com> 2021-06-23 12:40:58 +0000
committerGravatar GitHub <noreply@github.com> 2021-06-23 08:40:58 -0400
commit3f3e4f12863910fc86cc1dfb0adb68635a8a512f (patch)
tree91e4565d19dfaf4fd1a56e35d6e83df6d899c1bb /docs
parent28c0a45f3c1b89cd065ede9760c6efcf82dcdacd (diff)
downloadastro-3f3e4f12863910fc86cc1dfb0adb68635a8a512f.tar.gz
astro-3f3e4f12863910fc86cc1dfb0adb68635a8a512f.tar.zst
astro-3f3e4f12863910fc86cc1dfb0adb68635a8a512f.zip
Update createCollection() to handle `pageSize: Infinity` (#516)
* Fix pageSize calculation when Infinity is given * test grouping collection with pageSize: Infinity * test individual pages for collection items * Revert "update docs, remove reference to Inifinity" This reverts commit e8a976a543070bce4d661b5289e16d1097a593bc. * Adding changeset
Diffstat (limited to 'docs')
-rw-r--r--docs/collections.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/collections.md b/docs/collections.md
index 0f714c308..474bbe7a1 100644
--- a/docs/collections.md
+++ b/docs/collections.md
@@ -137,7 +137,7 @@ export async function createCollection() {
// Finally, `pageSize` and `pagination` is still on by default. Because
// we don't want to paginate the already-grouped pages a second time, we'll
// disable pagination.
- pageSize: 1,
+ pageSize: Infinity,
};
}
---
@@ -179,8 +179,8 @@ export async function createCollection() {
return allPokemon[params.index];
},
// Note: The default pageSize is fine because technically only one data object
- // is ever returned per route. We can set it to "1" in this example for completeness.
- pageSize: 1,
+ // is ever returned per route. We set it to Infinity in this example for completeness.
+ pageSize: Infinity,
};
}
---