Skip to content

Commit 68bdf81

Browse files
author
vvo
committed
fix(multipleChoiceList): limit should be pure JS
maxValuesPerFacet is a global parameter so can't be used here
1 parent ac74dfb commit 68bdf81

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

widgets/multiple-choice-list/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,13 @@ function multipleChoiceList({
4545

4646
return {
4747
getConfiguration: () => ({
48-
maxValuesPerFacet: limit,
4948
[operator === 'and' ? 'facets' : 'disjunctiveFacets']: [facetName]
5049
}),
5150
render: function(results, state, helper) {
5251
React.render(
5352
<MultipleChoiceList
5453
cssClass={cx(cssClass)}
55-
facetValues={results.getFacetValues(facetName, {sortBy: sortBy})}
54+
facetValues={results.getFacetValues(facetName, {sortBy: sortBy}).slice(0, limit)}
5655
search={helper.search.bind(helper)}
5756
template={template}
5857
toggleRefine={helper.toggleRefine.bind(helper, facetName)}

0 commit comments

Comments
 (0)