Skip to content
Open
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
10 changes: 7 additions & 3 deletions src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const DropdownComponent: <T>(
onChangeText,
confirmSelectItem,
onConfirmSelectItem,
onEndReached,
accessibilityLabel,
itemAccessibilityLabelField,
mode = 'default',
Expand Down Expand Up @@ -527,6 +528,8 @@ const DropdownComponent: <T>(
inverted={isTopPosition ? inverted : false}
renderItem={_renderItem}
keyExtractor={(_item, index) => index.toString()}
onEndReachedThreshold={0.5}
onEndReached={onEndReached}
showsVerticalScrollIndicator={showsVerticalScrollIndicator}
/>
);
Expand All @@ -551,6 +554,7 @@ const DropdownComponent: <T>(
renderSearch,
scrollIndex,
showsVerticalScrollIndicator,
onEndReached,
testID,
]
);
Expand Down Expand Up @@ -616,9 +620,9 @@ const DropdownComponent: <T>(
!isTopPosition
? { paddingTop: extendHeight }
: {
justifyContent: 'flex-end',
paddingBottom: extendHeight,
},
justifyContent: 'flex-end',
paddingBottom: extendHeight,
},
isFull && styles.fullScreen,
])}
>
Expand Down
1 change: 1 addition & 0 deletions src/components/Dropdown/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ export interface DropdownProps<T> {
searchQuery?: (keyword: string, labelValue: string) => boolean;
onChangeText?: (search: string) => void;
onConfirmSelectItem?: (item: T) => void;
onEndReached?: (item: T) => void;
}