Skip to content

Facets type slider alway visible without data #5592

Closed Answered by Haroenv
mlafrance-absolunet asked this question in General
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mlafrance-absolunet
Comment options

Answer selected by Haroenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Library: InstantSearch.js Issues in instantsearch.js
2 participants