Refine mantaining user query. #6557
-
Hi, first of all, I wanted to say that Algolia is amazing and has helped us a lot in improving our user experience. We are currently using InstantSearch with the SearchBox component and a custom queryHook to debounce the search (so it doesn't trigger a search with each keystroke). We are also using the useRefinementList hook for some attributes to allow users to filter the list. We are experiencing an issue where if a user types something in the SearchBox and then clicks the button that calls refine, it removes the user's query and only triggers the search (refinement) with the filter, without the query. Is there a way to maintain the user's query when refining? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The default should keep the query, are you possibly conditionally mounting the search box or something similar to that? A reproduction can help |
Beta Was this translation helpful? Give feedback.
-
I'm sorry, that was exactly the issue! I didn't realize it was being unmounted 🤦♂️ and it's already fixed now. Thank you for the quick response |
Beta Was this translation helpful? Give feedback.
The default should keep the query, are you possibly conditionally mounting the search box or something similar to that? A reproduction can help