mirror of
https://github.com/nickzuber/meteorite.git
synced 2024-11-28 23:03:35 +03:00
Clear query when clearing input
This commit is contained in:
parent
ac1a28a05f
commit
369d8f4bca
@ -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);
|
||||
|
@ -787,6 +787,7 @@ function Scene({
|
||||
<FilterSearch
|
||||
notifications={allNotifications}
|
||||
activeQuery={query}
|
||||
clearQuery={onClearQuery}
|
||||
view={view}
|
||||
dark={darkMode}
|
||||
loading={loading}
|
||||
|
Loading…
Reference in New Issue
Block a user