We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0352b22 commit 16c132cCopy full SHA for 16c132c
widgets/range-slider.js
@@ -69,10 +69,14 @@ function rangeSlider({
69
max
70
};
71
},
72
- _refine(helper, newValues) {
+ _refine(helper, stats, newValues) {
73
helper.clearRefinements(facetName);
74
- helper.addNumericRefinement(facetName, '>=', newValues[0]);
75
- helper.addNumericRefinement(facetName, '<=', newValues[1]);
+ if (newValues[0] > stats.min) {
+ helper.addNumericRefinement(facetName, '>=', newValues[0]);
76
+ }
77
+ if (newValues[1] < stats.max) {
78
+ helper.addNumericRefinement(facetName, '<=', newValues[1]);
79
80
helper.search();
81
82
render({results, helper, templatesConfig}) {
@@ -101,7 +105,7 @@ function rangeSlider({
101
105
Template={bindProps(Template, templateProps)}
102
106
hideWhenNoResults={hideWhenNoResults}
103
107
hasResults={stats.min !== null && stats.max !== null}
104
- onChange={this._refine.bind(this, helper)}
108
+ onChange={this._refine.bind(this, helper, stats)}
109
tooltips={tooltips}
110
/>,
111
containerNode
0 commit comments