Show all lvl0 values in hierarchical menu when using disjunctive facets to refine


I’m using Algolia in Vue, and I’ve set up all of my categories in the way described in the documentation (categories: { lvl0: “Decor”, lvl1: “Decor > Plants”}, etc.) and the hierarchical menu works great for the most part. Clicking on the menu filters the current products and shows any children nodes, as expected.

However, aside from using the hierarchical menu to filter categories, users can also filter categories by clicking on a menu item, which takes them to the products page with the category pre-filtered. To do this filtering, I’m using disjunctive facets to apply the correct filters.

The problem is that when filtering this way, the top level of the hierarchical menu filters too, so that only the parent of the current category is displayed. I’d like to show all of the lvl0 categories, regardless of what’s being filtered on. Is it possible to do this?

Hi @harrys,
By default, in the hierarchical menu component all lvl0 categories should be shown, so I might not be understanding the situation. (Also, there is ashow-parent-level option of the current refined value that might be useful.) Would you mind sharing a codesandbox or live site of what you’re doing so that we can better understand? This Vue IS template might be a good place to start.

Thanks in advance!