Facets type slider alway visible without data #5592
-
Hi Algolia team, I have already open request #551074, and I got the answer to come here. Current configs :
When i try search result with examples products without data with my custom attributes, this is always visible on filters with [0 - 0]. In Dashboard Algolia (indexes data), i validate this data is here only for good products. Example this simple product, have data for attribute
Thank for help if you can add fix on module. Cordialement, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can add a panel around the widget to hide it based on a condition: instantsearch.widgets.panel({
hidden(options) {
return options.range.min === 0 && options.range.max === 0;
},
})(instantsearch.widgets.rangeSlider)({
container: '#price',
attribute: 'price',
}); https://codesandbox.io/s/happy-fermat-ezupux?file=/src/app.js |
Beta Was this translation helpful? Give feedback.
You can add a panel around the widget to hide it based on a condition:
https://codesandbox.io/s/happy-fermat-ezupux?file=/src/app.js