diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index f5e27896c8e4..03b6c820da00 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -520,6 +520,7 @@ function Search({queryJSON, onSearchListScroll, isSearchScreenFocused, contentCo scrollEventThrottle={1} shouldKeepFocusedItemAtTopOfViewableArea={type === CONST.SEARCH.DATA_TYPES.CHAT} isScreenFocused={isSearchScreenFocused} + initialNumToRender={shouldUseNarrowLayout ? 5 : undefined} /> ); } diff --git a/src/components/SelectionList/BaseSelectionList.tsx b/src/components/SelectionList/BaseSelectionList.tsx index 4738bf6a92d8..2ad3fe8262cd 100644 --- a/src/components/SelectionList/BaseSelectionList.tsx +++ b/src/components/SelectionList/BaseSelectionList.tsx @@ -119,6 +119,7 @@ function BaseSelectionList( shouldScrollToFocusedIndex = true, onContentSizeChange, listItemTitleStyles, + initialNumToRender = 12, }: BaseSelectionListProps, ref: ForwardedRef, ) { @@ -831,7 +832,7 @@ function BaseSelectionList( indicatorStyle="white" keyboardShouldPersistTaps="always" showsVerticalScrollIndicator={showScrollIndicator} - initialNumToRender={12} + initialNumToRender={initialNumToRender} maxToRenderPerBatch={maxToRenderPerBatch} windowSize={windowSize} updateCellsBatchingPeriod={updateCellsBatchingPeriod} diff --git a/src/components/SelectionList/types.ts b/src/components/SelectionList/types.ts index 19c47414b089..5c7bd13d97e6 100644 --- a/src/components/SelectionList/types.ts +++ b/src/components/SelectionList/types.ts @@ -633,6 +633,9 @@ type BaseSelectionListProps = Partial & { /** Called when scrollable content view of the ScrollView changes */ onContentSizeChange?: (w: number, h: number) => void; + + /** Initial number of items to render */ + initialNumToRender?: number; } & TRightHandSideComponent; type SelectionListHandle = {