@@ -175,12 +175,9 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS
175175 const searchListRef = useRef < SelectionListHandle | null > ( null ) ;
176176
177177 useEffect ( ( ) => {
178- if ( ! isFocused ) {
179- return ;
180- }
181178 clearSelectedTransactions ( hash ) ;
182179 setCurrentSearchHash ( hash ) ;
183- } , [ hash , clearSelectedTransactions , setCurrentSearchHash , isFocused ] ) ;
180+ } , [ hash , clearSelectedTransactions , setCurrentSearchHash ] ) ;
184181
185182 const searchResults = currentSearchResults ?. data ? currentSearchResults : lastNonEmptySearchResults ;
186183 const isSearchResultsEmpty = ! searchResults ?. data || isSearchResultsEmptyUtil ( searchResults ) ;
@@ -218,11 +215,12 @@ function Search({queryJSON, currentSearchResults, lastNonEmptySearchResults, onS
218215 } , [ isSmallScreenWidth , selectedTransactions , selectionMode ?. isEnabled ] ) ;
219216
220217 useEffect ( ( ) => {
221- if ( isOffline || ! isFocused ) {
218+ if ( isOffline ) {
222219 return ;
223220 }
221+
224222 handleSearch ( { queryJSON, offset} ) ;
225- } , [ handleSearch , isOffline , offset , queryJSON , isFocused ] ) ;
223+ } , [ handleSearch , isOffline , offset , queryJSON ] ) ;
226224
227225 useEffect ( ( ) => {
228226 openSearch ( ) ;
0 commit comments