InstantSearch: Offer way to filter out facets with no values #5281
Unanswered
ChristianMattarVT
asked this question in
Ideas
Replies: 0 comments 2 replies
-
I think based on the screenshot you're using a panel, which means you can use the hidden parameter to conditionally hide the filter. panel({
hidden(options) {
return !options.isFromSearch && options.items.length === 0;
}
})... If that's not the code you're using to rendering, could you post a sample of what you have so far? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks Haroenv! I actually filed this in the wrong component. |
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
-
After setting up which facets to display in which way via "Facet display (renderingContent)" section, Instantsearch will always render the entire list of facets configured there - even those, for which no values are in the result set.
We attempted to build this filtering ourselves by hiding facets with no values. However, this led to an issue when using the "Facet value search" feature: In cases where all filter values would be filtered out by entering an invalid search term, the entire facet would suddenly disappear.
Would appreciate support for this in the InstantSearch framework itself!
Beta Was this translation helpful? Give feedback.
All reactions