Always display HierarchicalMenu

I want to render a HierarchicalMenu that shows all values even when there are no hits attached to it.

I tried following this example https://codesandbox.io/s/instantsearchjs-facets-with-count-of-0-pk62m but couldn’t make it work with HierarchicalMenu.

Hi jsxd.17. I don’t think it does this by default, so you will likely need to customize the widget or build your own: https://www.algolia.com/doc/api-reference/widgets/hierarchical-menu/js/#connector

I’m already working with the connector but I don’t know how to proceed, I tried to adapt https://codesandbox.io/s/instantsearchjs-facets-with-count-of-0-pk62m to the custom HierarchicalMenu but I didn’t find any guidance about this.

Is there any example of this somewhere?

Could someone offer some help/guidance about this feature?

this should be fairly close to the same architecture, but with multiple levels. It’s not perfect since some post-processing still needs to happen to recreate the hierarchical tree, but I thought to already let you know this solution:

note that it will do as many extra operations as you have levels in the hierarchical menu, once on application start

Thanks for giving me a new approach to follow, I’ll give this a try.

1 Like