Replies: 8 comments 2 replies
-
Unfortunately InstantSearch is modelled around automatic applying of all search filters. that means that the approach for not applying things automatically isn't really documented. however, if it really makes sense for your use case to not automatically apply, what you do is the following:
|
Beta Was this translation helpful? Give feedback.
-
@Haroenv Ah, I'll have a look into those options then, just a last question: I have a <Configure
hitsPerPage={10}
facetFilters={filters}
numericFilters={numericFilters}
attributesToRetrieve={[ 'name', 'pet_type']}
/> And I would like to dynamically search on the facet values in React with the configure widget on submitting a button e.g. Is there an example of this in action? I've searched the Algolia documentation for this for days on end for this example to no avail. |
Beta Was this translation helpful? Give feedback.
-
For that use case, https://www.algolia.com/doc/guides/building-search-ui/widgets/customize-an-existing-widget/react/#virtual-widgets with Otherwise you can also use the To better understand what you're trying to do, do you have your current code in a sandbox? We have a regular starter sandbox available for that: here. Thanks! As said, since the pattern of not applying refinements automatically isn't one that we designed InstantSearch around, we don't have any examples available of it unfortunately |
Beta Was this translation helpful? Give feedback.
-
Thanks, @Haroenv, Is are there any examples of Thanks. |
Beta Was this translation helpful? Give feedback.
-
only in the context of routing, sorry: https://github.com/algolia/react-instantsearch/tree/master/examples/react-router |
Beta Was this translation helpful? Give feedback.
-
I'm keeping this issue open because this is an interesting use case that we already chatted about internally, and having references to user requests can be a good base if we get around and decide to tackle it. |
Beta Was this translation helpful? Give feedback.
-
hi, any news about this topic? I'm also interested in it (vue instantsearch) |
Beta Was this translation helpful? Give feedback.
-
I found a working solution. With a combination of onStateChange and a middleware it's now possible to submit the search by clicking on a button. But what is not yet working is the routing feature:
I have a routing object which works fine, but when I click on the search button, the url doesn't get updated. any hints how I can achieve this? |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe 🙏
I am trying to create a simple submit/refine button for a site using React Algolia, currently unable to or not sure how this works in Algolia.
Describe the solution you'd like 🤔
An example of creating a search submit button in the documentation.
Describe alternatives you've considered ✨
Most of the examples show a search bar, (E-Commerce Example) but in my usecase this isn't applicable to my needs.
Beta Was this translation helpful? Give feedback.
All reactions