The default behavior of the AisHierarchicalMenu
is that, when a parent facet is chosen, then a child is chosen, and then that child is deselected, both the parent and the child facets are cleared– clearing the entire search query.
Tooling
I’m using Vue InstantSearch w/the Options API.
https://www.algolia.com/doc/api-reference/widgets/hierarchical-menu/vue/
Expected behavior
Users would expect that parent category to be maintained when only “toggling off” the nested/child category.
Question
Is there a way to override the default refine() behavior in order to allow for that behavior, as opposed to the default? I believe that I’d need to customize the component, but am trying to avoid creating an entirely unique component.
- I’ve tried customizing the params passed to the refine() function, but it seems that the refine() toggles the parent no matter the param passed to it.
Mel Bazany is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.