Instantsearch.js: v2 rangeSliders broken with undefined values

Created on 30 May 2017  ·  6Comments  ·  Source: algolia/instantsearch.js

Do you want to request a feature or report a bug?
bug

Bug: What is the current behavior?
When there is a rangeSlider and the specified attributeName is undefined/null in the results, it will incorrectly return "No results".

Example: https://jsfiddle.net/timkelty/fLxzc27h/

  • Click the "Current Designs" refinementList facet.
  • it will show "no results", but should not (there are 90).
  • If you remove the rangeSlider widget, it will work properly

It would seem it has something to do with how the numericRefinements are being set.
I'm logging the search state and seeing something like this:

screen shot 2017-05-30 at 11 18 34 am

Since the filtered results are null/undefined, they get incorrectly filtered out, even though I'm not touching the rangeSlider.

What is the version you are using? Always use the latest one before opening a bug issue.

This bug seems to have been introduced in 2.0.0.beta.2.
If I use 2.0.0.beta.1, it doesn't occur.
Here's the same jsFiddle with 2.0.0.beta.1, working: https://jsfiddle.net/timkelty/1g4m8m7q/

Most helpful comment

Confirmed fixed with 2.0.0-beta.5.
Thanks @iam4x!

All 6 comments

Hi @timkelty thanks for the bug report :) We introduced the new implementation of the slider late in the beta that's why you don't have the issue using the beta-1.

That being said, have you tried the latest beta-4? Will check on my side too :)

Thank's for the repro case @timkelty I'm looking into it 👍

@bobylito Not working with beta4 (https://jsfiddle.net/vau0f2wx/1/)

That being said, have you tried the latest beta-4? Will check on my side too :)

Yep, sorry meant to mention it occurs in beta 2 — 4

Good catch @timkelty should be fixed, I'm releasing a new beta.

Confirmed fixed with 2.0.0-beta.5.
Thanks @iam4x!

Was this page helpful?
0 / 5 - 0 ratings