Adding search term to currentRefinedValues on instantsearch.js


Is there any easy way to include a user’s search term as part of the currentRefinedValues widget on instantsearch.js?

I feel that most users forget there is text in the search bar after going and applying a bunch of filters, especially if the page they’ve arrived at is actually a pre-defined search. They essentially need to go into the search input box and delete the text.

I use pre-defined searches as a way to get targeted organic traffic. As an example
The results aren’t always perfect but it generally gives the user what they need without you needing to classify every item by every possible category.

It would also be great if the “Clear all” attached to currentRefinedValues could also (optionally) clear the search term.


1 Like

Hi @baz ,

There is no easy way to do that for now. We have an opened issue that is related to that. We want to have the ability to clear the query using the clear all button, and doing so we want to maybe add the ability to see the query. The issue is on github.