diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index ad47dbc87929..0561ce0009cd 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -175,12 +175,9 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS const searchListRef = useRef(null); useEffect(() => { - if (!isFocused) { - return; - } clearSelectedTransactions(hash); setCurrentSearchHash(hash); - }, [hash, clearSelectedTransactions, setCurrentSearchHash, isFocused]); + }, [hash, clearSelectedTransactions, setCurrentSearchHash]); const searchResults = currentSearchResults?.data ? currentSearchResults : lastNonEmptySearchResults; const isSearchResultsEmpty = !searchResults?.data || isSearchResultsEmptyUtil(searchResults); @@ -218,11 +215,12 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS }, [isSmallScreenWidth, selectedTransactions, selectionMode?.isEnabled]); useEffect(() => { - if (isOffline || !isFocused) { + if (isOffline) { return; } + handleSearch({queryJSON, offset}); - }, [handleSearch, isOffline, offset, queryJSON, isFocused]); + }, [handleSearch, isOffline, offset, queryJSON]); useEffect(() => { openSearch();