@@ -60,7 +60,6 @@ type SearchProps = {
6060 queryJSON : SearchQueryJSON ;
6161 onSearchListScroll ?: ( event : NativeSyntheticEvent < NativeScrollEvent > ) => void ;
6262 contentContainerStyle ?: ContentStyle ;
63- // contentContainerStyle?: StyleProp<ViewStyle>; // TODO: remove this
6463 searchResults ?: SearchResults ;
6564 handleSearch : ( value : SearchParams ) => void ;
6665 isMobileSelectionModeEnabled : boolean ;
@@ -243,6 +242,7 @@ function Search({queryJSON, searchResults, onSearchListScroll, contentContainerS
243242
244243 handleSearch ( { queryJSON, offset} ) ;
245244 // We don't need to run the effect on change of isFocused.
245+ // eslint-disable-next-line react-hooks/exhaustive-deps
246246 } , [ handleSearch , isOffline , offset , queryJSON ] ) ;
247247
248248 useEffect ( ( ) => {
@@ -543,7 +543,7 @@ function Search({queryJSON, searchResults, onSearchListScroll, contentContainerS
543543 return ;
544544 }
545545 setOffset ( offset + CONST . SEARCH . RESULTS_PAGE_SIZE ) ;
546- } , [ offset , searchResults ?. search ?. hasMoreResults , shouldShowLoadingMoreItems , shouldShowLoadingState ] ) ;
546+ } , [ isFocused , offset , searchResults ?. search ?. hasMoreResults , shouldShowLoadingMoreItems , shouldShowLoadingState ] ) ;
547547
548548 const toggleAllTransactions = useCallback ( ( ) => {
549549 const areItemsGrouped = ! ! groupBy ;
0 commit comments