Add prop enableContentPanningGesture to action sheet
This commit is contained in:
parent
7c43029bf0
commit
d9fa16977e
|
@ -140,7 +140,8 @@ const ActionSheet = React.memo(
|
|||
style={{ ...styles.container, ...bottomSheet }}
|
||||
backgroundStyle={{ backgroundColor: colors.focusedBackground }}
|
||||
onChange={index => index === -1 && onClose()}
|
||||
enableContentPanningGesture={false}
|
||||
// We need this to allow horizontal swipe gesture inside the bottom sheet like in reaction picker
|
||||
enableContentPanningGesture={data?.enableContentPanningGesture ?? true}
|
||||
{...androidTablet}
|
||||
>
|
||||
<BottomSheetContent options={data?.options} hide={hide} children={data?.children} hasCancel={data?.hasCancel} />
|
||||
|
|
|
@ -63,7 +63,7 @@ const EmojiSearchBar = React.forwardRef<TextInput, IEmojiSearchBarProps>(
|
|||
onChangeText(text);
|
||||
};
|
||||
|
||||
const renderItem = React.memo((emoji: IEmoji) => (
|
||||
const ListItem = React.memo(({ emoji }: { emoji: IEmoji }) => (
|
||||
<View style={[styles.emojiContainer]}>
|
||||
<Pressable onPress={() => onEmojiSelected(emoji)}>
|
||||
<Emoji emoji={emoji} baseUrl={baseUrl} />
|
||||
|
@ -76,7 +76,7 @@ const EmojiSearchBar = React.forwardRef<TextInput, IEmojiSearchBarProps>(
|
|||
<FlatList
|
||||
horizontal
|
||||
data={searchText ? emojis : frequentlyUsedEmojis}
|
||||
renderItem={({ item }) => renderItem(item as IEmoji)}
|
||||
renderItem={({ item }) => <ListItem emoji={item as IEmoji} />}
|
||||
showsHorizontalScrollIndicator={false}
|
||||
ListEmptyComponent={() => (
|
||||
<View style={styles.listEmptyComponent}>
|
||||
|
@ -92,7 +92,8 @@ const EmojiSearchBar = React.forwardRef<TextInput, IEmojiSearchBarProps>(
|
|||
<Pressable
|
||||
style={({ pressed }: { pressed: boolean }) => [styles.openEmojiKeyboard, { opacity: pressed ? 0.7 : 1 }]}
|
||||
onPress={openEmoji}
|
||||
hitSlop={BUTTON_HIT_SLOP}>
|
||||
hitSlop={BUTTON_HIT_SLOP}
|
||||
>
|
||||
<CustomIcon name='chevron-left' size={30} color={colors.collapsibleChevron} />
|
||||
</Pressable>
|
||||
<View style={{ flex: 1 }}>
|
||||
|
|
|
@ -83,7 +83,7 @@ const ReactionPicker = ({ onEmojiSelected, message, reactionClose }: IReactionPi
|
|||
returnKeyType='search'
|
||||
underlineColorAndroid='transparent'
|
||||
onChangeText={handleTextChange}
|
||||
style={[styles.reactionPickerSearchbar, { backgroundColor: colors.passcodeButtonActive }]}
|
||||
style={[styles.reactionPickerSearchbar, { backgroundColor: colors.borderColor }]}
|
||||
value={searchText}
|
||||
onClearInput={() => handleTextChange('')}
|
||||
iconRight={'search'}
|
||||
|
|
|
@ -842,7 +842,8 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
|
|||
height={height}
|
||||
/>
|
||||
),
|
||||
snaps: [400, '100%']
|
||||
snaps: [400, '100%'],
|
||||
enableContentPanningGesture: false
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue