mirror of
https://github.com/nickzuber/meteorite.git
synced 2024-12-01 08:28:02 +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({
|
export function FilterSearch({
|
||||||
isSearching,
|
isSearching,
|
||||||
activeQuery,
|
activeQuery,
|
||||||
|
clearQuery,
|
||||||
dark,
|
dark,
|
||||||
notifications,
|
notifications,
|
||||||
view,
|
view,
|
||||||
@ -245,6 +246,7 @@ export function FilterSearch({
|
|||||||
const {filter, text} = parseTextForFilter(input, activeFilter);
|
const {filter, text} = parseTextForFilter(input, activeFilter);
|
||||||
setSearchInput(text);
|
setSearchInput(text);
|
||||||
if (input === '') {
|
if (input === '') {
|
||||||
|
clearQuery();
|
||||||
setActiveFilter(null);
|
setActiveFilter(null);
|
||||||
} else {
|
} else {
|
||||||
setActiveFilter(filter);
|
setActiveFilter(filter);
|
||||||
|
@ -787,6 +787,7 @@ function Scene({
|
|||||||
<FilterSearch
|
<FilterSearch
|
||||||
notifications={allNotifications}
|
notifications={allNotifications}
|
||||||
activeQuery={query}
|
activeQuery={query}
|
||||||
|
clearQuery={onClearQuery}
|
||||||
view={view}
|
view={view}
|
||||||
dark={darkMode}
|
dark={darkMode}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
|
Loading…
Reference in New Issue
Block a user