-
Notifications
You must be signed in to change notification settings - Fork 381
Open
Labels
Description
When a search term is set, the filters are cleared by default. This usually makes sense and most search interfaces on the web behave the same. However, in a setup where initialState is used, I would expect that setSearchTerm restores the initial filters, similar to what reset does.
My personal use-case is a site with multilingual content. The search results are initially filtered by the active site language, but users can change the language filter to show other languages too. Currently, the setSearchTerm action clears the language filter. Instead, I need (and expected) Search UI to restore the initial language filter.
Proposed solution
Either of these two options:
- Change the behavior of the
shouldClearFiltersoption to restore initial filters if there are any. - Add a new option to setSearchTerm, eg.
shouldResetFilters, to reset filters to the initial state.
Reactions are currently unavailable