For now the clearAll widget only allows to clear facet refinements, but not the search query itself. Would be great to have a way that enables it, either:
search.helper.setQuery('').search() Why not make it the default behavior? I don't remember the rationale behind this choice, but it does not seem to hold imho.
I agree, a clear all should clear everything by default (even if it'd require a minor version change)
Not sure we can make it default without breaking backward compatibility.
That being said, it would be great to be able to clear one, or the other, or both.
We could introduce that as a change for a v2 of instantsearch.js?
I agree with you @bobylito, clearAll as it says should clear everything from state of search. Maybe we can introduce a clearRefinements widget to keep a way to achieve current behaviour?
Man oh man, I've been working all day on trying to set something like this up. I want to give my users to ability to click an "X" button on the search bar and 'clearAll' input text - not just selected facets - but it seems like this is not yet possible.
Hi @WinstonGFX, this will be possible in v2, which is already in beta. Check out the new doc: https://community.algolia.com/instantsearch.js/v2
Done in v2
Done in v2
Here: https://community.algolia.com/instantsearch.js/v2/widgets/clearAll.html#struct-ClearAllWidgetOptions-clearsQuery
Most helpful comment
We could introduce that as a change for a v2 of instantsearch.js?