instantsearch icon indicating copy to clipboard operation
instantsearch copied to clipboard

connectBreadcrumb should rely on state rather than results

Open samouss opened this issue 6 years ago • 1 comments

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.

samouss avatar Aug 17 '18 12:08 samouss

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.

bobylito avatar Aug 20 '18 08:08 bobylito