instantsearch
instantsearch copied to clipboard
connectBreadcrumb should rely on state rather than results
Is your feature request related to a problem? Please describe 🙏
The implementation of connectBreadcrumb
rely on the results of the search. It works but when the search doesn't return any results we are not able to display the current breadcrumb. It should be possible though because the breadcrumb could be completely be derived from the state.
Describe the solution you'd like 🤔
We can leverage getHierarchicalFacetBreadcrumb
to retrieve the current values for the breadcrumb. Then we can compute the path for each of the value. Should be tested though not sure that we can cover all the use case that we have right now.
We can leverage getHierarchicalFacetBreadcrumb to retrieve the current values for the breadcrumb. Then we can compute the path for each of the value. Should be tested though not sure that we can cover all the use case that we have right now.
This solution makes a lot of sense! However, I would be careful because there must be a reason why we didn't went for it in the first place.