Skip to content

Commit

Permalink
fix(multipleChoiceList): limit should be pure JS
Browse files Browse the repository at this point in the history
maxValuesPerFacet is a global parameter so can't be used here
  • Loading branch information
vvo committed Sep 4, 2015
1 parent ac74dfb commit 68bdf81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions widgets/multiple-choice-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ function multipleChoiceList({

return {
getConfiguration: () => ({
maxValuesPerFacet: limit,
[operator === 'and' ? 'facets' : 'disjunctiveFacets']: [facetName]
}),
render: function(results, state, helper) {
React.render(
<MultipleChoiceList
cssClass={cx(cssClass)}
facetValues={results.getFacetValues(facetName, {sortBy: sortBy})}
facetValues={results.getFacetValues(facetName, {sortBy: sortBy}).slice(0, limit)}
search={helper.search.bind(helper)}
template={template}
toggleRefine={helper.toggleRefine.bind(helper, facetName)}
Expand Down

0 comments on commit 68bdf81

Please sign in to comment.