Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
);
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function BaseSelectionList<TItem extends ListItem>(
shouldScrollToFocusedIndex = true,
onContentSizeChange,
listItemTitleStyles,
initialNumToRender = 12,
}: BaseSelectionListProps<TItem>,
ref: ForwardedRef<SelectionListHandle>,
) {
Expand Down Expand Up @@ -831,7 +832,7 @@ function BaseSelectionList<TItem extends ListItem>(
indicatorStyle="white"
keyboardShouldPersistTaps="always"
showsVerticalScrollIndicator={showScrollIndicator}
initialNumToRender={12}
initialNumToRender={initialNumToRender}
maxToRenderPerBatch={maxToRenderPerBatch}
windowSize={windowSize}
updateCellsBatchingPeriod={updateCellsBatchingPeriod}
Expand Down
3 changes: 3 additions & 0 deletions src/components/SelectionList/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ type BaseSelectionListProps<TItem extends ListItem> = Partial<ChildrenProps> & {

/** Called when scrollable content view of the ScrollView changes */
onContentSizeChange?: (w: number, h: number) => void;

/** Initial number of items to render */
initialNumToRender?: number;
} & TRightHandSideComponent<TItem>;

type SelectionListHandle = {
Expand Down