Using connectRange within a panel widget #6145
Replies: 1 comment
-
I figured it out. You have to split it into two: the "connection" and the params:
becomes this to have it in a panel:
and so this sample code from the docs:
is added directly to the widgets like this:
and added to a panel like this:
Note that customRangeSlider is a function that is called when adding it directly but passed as a reference for the panel version. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created a normal range slider using this:
It works but I want to customize it so the docs recommend to use connectRange according to https://www.algolia.com/doc/api-reference/widgets/range-slider/js/#connector
This instructions are:
The issue I run into is that I want to wrap this in a panel like my other widgets. But the function that is returned by
instantsearch.widgets.panel()
does not accept the variable customRangeSlider. I'm doing this in typescript so I can see from the types that it requires something entirely different.And I want to wrap it in a panel instead of rendering the panel header in my renderRangeSlider function because I am looping through all my filters and adding each to a panel using generic code. I would like it to remain consistent in that way.
So what is the correct approach in this case?
Beta Was this translation helpful? Give feedback.
All reactions