instantsearch icon indicating copy to clipboard operation
instantsearch copied to clipboard

RangeSlider lose informations about the search

Open samouss opened this issue 7 years ago • 1 comments

If you set some values on the RangeSlider and perform a search with no results the slider will display wrong value.

For example you can set the RangeSlider at a minimum of 1500 then trigger a search with the characters IK. The results are the product of the query IK with a price greater than 1500. But the slider displays a wrong state with a range from 12 to 180.

https://jsfiddle.net/tksyn43f/1/

samouss avatar Sep 27 '17 12:09 samouss

That looks like a bug. In this case the slider widget will update the minimum bound (set by a user) to the maximal value (from the results) you get in the subsequent search if the value of the max is < min bound that you set using the slider.

  • initial search: no bounds
  • set min bound to 1500 (around): min bound = 1500
  • type I: query = I, min bound = 1500
  • type K: query = IK, min bound = 180
  • remove one character: query = I, min bound = 180

We should probably keep the values.

bobylito avatar Sep 27 '17 13:09 bobylito