Skip to content

Commit

Permalink
docs: wrong use of limit setup for grouped searches
Browse files Browse the repository at this point in the history
  • Loading branch information
SEMilfred authored May 16, 2024
1 parent 11b542b commit 08b7fd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The configuration object (`config`-prop) allows you to finely tune the behaviour
| enableLiveSearch | Can be either an array of particular parameters that should trigger a live search or simply a true or false value. | false | Boolean\|Array |
| immediateSearch | Tells whether the LimboSearch component should trigger a search immediately on creation. The value may be either a boolean value or an object (which will be read as a truthy value), whereas the object can have a true `useUrlQuery` property to have the component read parameter values from the url query. `ssr` decides if results should be server side rendered on load. | { useUrlQuery: true, ssr: true } | Boolean\|Object |
| clearRouterHashOnSearch | If set to true or given an object, a new search will trigger a removal of the hash from the route. Per default the initial search does not trigger this, but this can be changed by passing an object with `includeInitialSearch` set to true. | false | Boolean\|Object |
| limit | The number of search results to fetch per search. If a numeric limit is set, it will be used for both values - grouped paginations\* should be set with the corresponding ids (fx. `limit: { l1: { initial: 18, value: 12 }, l2: { initial: 15, value: 6 } }`). When an object is used, the `initial`-property dictates the limit of a new search, whereas the `value`-property dictates the limit of additive searches ("fetch more"). The `initial`-property is not required. | { initial: 12, value: 12 } | Number\|Object |
| limit | The number of search results to fetch per search. If a numeric limit is set, it will be used for both values - grouped paginations\* should be set with the corresponding ids (fx. `limit: { 1: { initial: 18, value: 12 }, 2: { initial: 15, value: 6 } }`). When an object is used, the `initial`-property dictates the limit of a new search, whereas the `value`-property dictates the limit of additive searches ("fetch more"). The `initial`-property is not required. | { initial: 12, value: 12 } | Number\|Object |
| enableGroupedSearch\* | Make use of grouped pagination (l1, o1, l2, o2, (ie. l{id}, o{id}) etc.) instead of simply "limit" and "offset". | false | Boolean |
| groupParameter | When needing to "fetch more / all" and grouped search is enabled\*, we need a parameter to filter that. The group parameter will then be assigned the id of the group currently being further searched. | 'groups' | String |
| updateUrlQueryOnSearch | This will update the url-query to reflect the search. | true | Boolean |
Expand Down

0 comments on commit 08b7fd6

Please sign in to comment.