Skip to content

Commit 066539c

Browse files
author
Shane Afsar
authored
docs(api): add maxResultsPerGroup (#1897)
1 parent 61fc92c commit 066539c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

packages/website/docs/api.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,34 @@ docsearch({
319319
</TabItem>
320320
</Tabs>
321321

322+
## `maxResultsPerGroup`
323+
324+
> `type: number` | **optional**
325+
326+
The maximum number of results to display per search group. Default is 5.
327+
328+
[You can find a working example without JSX in this sandbox](https://codesandbox.io/s/docsearch-v3-maxresultspergroup-without-jsx-ct9m22?file=/src/index.js)
329+
330+
<Tabs
331+
groupId="language"
332+
defaultValue="js"
333+
values={[
334+
{ label: 'JavaScript', value: 'js', }
335+
]
336+
}>
337+
<TabItem value="js">
338+
339+
```js
340+
docsearch({
341+
// ...
342+
maxResultsPerGroup: 7,
343+
});
344+
```
345+
346+
</TabItem>
347+
348+
</Tabs>
349+
322350
[1]: https://www.algolia.com/doc/ui-libraries/autocomplete/introduction/what-is-autocomplete/
323351
[2]: https://github.com/algolia/docsearch/
324352
[3]: https://github.com/algolia/docsearch/tree/master

0 commit comments

Comments
 (0)