Skip to content

Commit

Permalink
fix Keyboard opens and closes when tapping on split input
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Jun 5, 2024
1 parent 3c04b02 commit 51a0e4a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/MoneyRequestConfirmationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,7 @@ function MoneyRequestConfirmationList({
footerContent={footerContent}
listFooterContent={listFooterContent}
containerStyle={[styles.flexBasisAuto]}
removeClippedSubviews={false}
/>
</MouseProvider>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/SectionList/index.android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function SectionListWithRef<ItemT, SectionT>(props: SectionListProps<ItemT, Sect
// For Android we want to use removeClippedSubviews since it helps manage memory consumption. When we
// run out memory images stop loading and appear as grey circles
// eslint-disable-next-line react/jsx-props-no-multi-spaces
removeClippedSubviews
removeClippedSubviews={props.removeClippedSubviews ?? true}
/>
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function BaseSelectionList<TItem extends ListItem>(
onEndReachedThreshold,
windowSize = 5,
updateCellsBatchingPeriod = 50,
removeClippedSubviews = true,
}: BaseSelectionListProps<TItem>,
ref: ForwardedRef<SelectionListHandle>,
) {
Expand Down Expand Up @@ -677,6 +678,7 @@ function BaseSelectionList<TItem extends ListItem>(
<>
{!listHeaderContent && header()}
<SectionList
removeClippedSubviews={removeClippedSubviews}
ref={listRef}
sections={slicedSections}
stickySectionHeadersEnabled={false}
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 @@ -398,6 +398,9 @@ type BaseSelectionListProps<TItem extends ListItem> = Partial<ChildrenProps> & {
/** Styles for the section title */
sectionTitleStyles?: StyleProp<ViewStyle>;

/** This may improve scroll performance for large lists */
removeClippedSubviews?: boolean;

/**
* When true, the list won't be visible until the list layout is measured. This prevents the list from "blinking" as it's scrolled to the bottom which is recommended for large lists.
* When false, the list will render immediately and scroll to the bottom which works great for small lists.
Expand Down

0 comments on commit 51a0e4a

Please sign in to comment.