By default, when the user selected any refinement in any refinement widget, say: clicking on a category in a categories refinement list. If he then changes the query and the current list of facets is no more relevant, we will hide the widget completely.
To better understand this issue, here are the steps to reproduce the current behavior:
(1):

(2):

As you can see, as I user, you clicked on something and you just lose the context of your own actions.
This issue is currently mitigated by the currentRefinedValues and clearAll widgets, which lets you inspect and clear your individual filters, and clear all filters, respectively.
But is this the best default solution?
Since we are building instantsearch-react and it will pave the way to IS V2, we are able to change that default behavior.
We propose to change the default behavior and always continue showing refinement widgets if the user refined values even when no more hits are matching. This would let the user deselect them in the same way they selected them in the first place: by clicking on that particular facet value.
You’ll see the refinement list you first interacted will disappear, and you have no way to:
What do you think?
PS: No matter what solution we chose, we think it should still be feasible to completely hide the widget via an option
cc @algolia/javascript and @maxiloc (you are at the root of the "hide widget feature" for magento)
@Morhaus Oh yes please. I had this issue as well, and it is very disturbing.
As you say, this forces you to add the "clear all refinements" + put selected refinements at the top.
I'm 100% in for always displaying active refinements. To me, this issue deserves the "bug" label.
+1 for always displaying active refinements.
+1 on displaying selected refinements. But what happens when I deselect them? The widget will disappear? Or only the value will disappear? Or the widget and the value will be still active for selecting?
@JanPetr Depends on whether deselecting the refinement yields new results or not. If it does, then the available refinements will appear in its stead. Otherwise, the widget will disappear. In both cases, the previously selected refinement will disappear.
Yessssss 👍
What about setting autoHideContainer to false?
If there are no results then there are no facet values... So is it going to show the selected facet values anyway?
Most helpful comment
@Morhaus Oh yes please. I had this issue as well, and it is very disturbing.
As you say, this forces you to add the "clear all refinements" + put selected refinements at the top.
I'm 100% in for always displaying active refinements. To me, this issue deserves the "bug" label.