Open DrikABrak opened 2 years ago
Hi @DrikABrak ,
This is an expected behaviour. Both NumberRangeInteractor
and NumberInteractor
uses only the initial bounds value from facet stats and use them to setup widget bounds.
That is to say, they shows the bounds for the entire set of hits.
Please note that the bounds values change on each search response and represent the bounds for the current set of hits .
Let's say you have a numeric facet value controlled by a range slider.
0...5
, initial value: 0...5
. It looks as follows: 0 |>----<| 5
0 |->---<| 5
1...5
, a new search request launched.1...5
1 |>---<| 5
That's why the numeric interactors only take into account the bounds for the entire set of hits and not updated on each result.
If you want to implement a custom behaviour for your range widget, you can make it conform to Boundable
protocol and connect it to the HitsSearcher
using the connect
method. Then, you can implement the behaviour your expect in the applyBounds
method implementation.
Let me know if you have any further question.
Describe the bug π Problem with NumberRangeInteractor and NumberRangeObservableController
When an initial search is done, the right values are found. But after, if I am doing another search with a different text, the range does not change!!
Expected behavior π The new query is taken into account for the new values of the range
Environment:
Additional context For a marketplace type application on iOS, I am adding functionalities such as selectable segment, hierarchical categories, dynamic facets and a Range Slider for the price. I also have a search bar for searching. Works well for all EXCEPT the Range Slider. When an initial search is done, the right values are found. But after, if I am doing another search with a different text, the range does not change!!
I have this numericRangeInteractor that I connected to my FilterState and searcher, and finally my controller (NumericRangeController) For info I have connector my Numeric Range Interactor this following way take the traditional RangeSlider as my slider.
Any idea? I tested everything. Thanks !!!