Skip to content

Commit bab7ca4

Browse files
Merge #720
720: Fix default value of hitsPerPage in readme r=bidoubiwa a=bidoubiwa Co-authored-by: Charlotte Vermandel <[email protected]>
2 parents f4cee3d + 5705780 commit bab7ca4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Usage:
122122
{ paginationTotalHits: 50 } // default: 200
123123
```
124124

125-
`hitsPerPage` has a value of `6` by default and can [be customized](#-hitsperpage).
125+
`hitsPerPage` has a value of `20` by default and can [be customized](#-hitsperpage).
126126

127127
### Finite Pagination
128128

@@ -385,7 +385,7 @@ We also suggest looking at [Meilisearch's search parameters](https://docs.meilis
385385

386386
```js
387387
instantsearch.widgets.configure({
388-
hitsPerPage: 6,
388+
hitsPerPage: 20,
389389
// other algoliasearch parameters
390390
})
391391
```

src/contexts/search-context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function createSearchContext(
2323

2424
const pagination = createPaginationContext({
2525
paginationTotalHits: options.paginationTotalHits,
26-
hitsPerPage: instantSearchParams?.hitsPerPage,
26+
hitsPerPage: instantSearchParams?.hitsPerPage, // 20 by default
2727
page: instantSearchParams?.page,
2828
})
2929

0 commit comments

Comments
 (0)