Would be amazing if anyone could give us a quick pointer here. We really just want to prefilter the page based on another prop (handle) before the results show. We have no facets or other filters on the website so far. It should be straight-forward, I just can’t seem to figure it out right now.
I’ve only used RouteToState to manipulate state info so I don’t have a good working example to share, but looking at the code in the docs, I notice the state info is scoped to an index and particular widget:
This is working though - just not filtered. It simply returns the first N entries from my index (which I do not want).
I must be missing some small detail.
Maybe the UI is misconfigured? I had it before in the past that something in the Algolia UI was not “activated” or configured, so nothing worked, without any log or error warnings.
Not sure if this helps, but I found a very specific issue around using setIndexUIState with filterOnly attributes:
Some customers have reported they could not use the “Facet filters” option from the Dashboard > Add Query Parameters modal with attributesForFaceting that are set as filterOnly() while it’s working as expected with searchable() ones.
Here was the solution for that issue, including a codesandbox:
The uiState reflects the mounted widgets, since the type attribute is not tied to a widget, setting the uiState has no impact.
If you add a virtual <RefinementList> widget for the type attribute, it works:>