Clear query when clearing input

This commit is contained in:
Nicholas Zuber 2020-11-02 19:11:50 -05:00
parent ac1a28a05f
commit 369d8f4bca
2 changed files with 3 additions and 0 deletions

View File

@ -190,6 +190,7 @@ function filterFromQuery({query, items, compare}) {
export function FilterSearch({
isSearching,
activeQuery,
clearQuery,
dark,
notifications,
view,
@ -245,6 +246,7 @@ export function FilterSearch({
const {filter, text} = parseTextForFilter(input, activeFilter);
setSearchInput(text);
if (input === '') {
clearQuery();
setActiveFilter(null);
} else {
setActiveFilter(filter);

View File

@ -787,6 +787,7 @@ function Scene({
<FilterSearch
notifications={allNotifications}
activeQuery={query}
clearQuery={onClearQuery}
view={view}
dark={darkMode}
loading={loading}