Skip to content

In iOS, the bottom sheet automatically close down when the user scrolls down #14

@chdnitinsharma

Description

@chdnitinsharma

In iOS, when scrolling, the bottom sheet automatically closes, but on Android, the scroll works fine.

new-bug-ios-scroll.mov

const [sliderMaxHeight, setSliderMaxHeight] = useState('60%');
 const [infoHeight, setInfoHeight] = useState(480)
 const handleBottomSheetPress = () => {
        setSliderMaxHeight('90%');    
    }

<BottomSheet
    height={Platform.OS == 'android' ? '100%' : '90%'}
    sliderMaxHeight={sliderMaxHeight}
    onOpen={() => handleBottomSheetPress()}
    onClose={() => setInfoHeight(80)}
    position={'absolute'}
    isOpen
>
    {(onScrollEndDrag: any) => {
        console.log('onScrollEndDrag : ', onScrollEndDrag)
        return (
            <ScrollView scrollToOverflowEnabled={true} contentContainerStyle={{ flexGrow: 1 }} onScrollEndDrag={onScrollEndDrag}>
                {[...Array(30)].map((_, index) => (
                    <View key={`${index}`} style={{
                        height: 60,
                        width: '90%',
                        alignSelf: 'center'
                    }}>
                        <Text>{`List Item ${index + 1}`}</Text>
                    </View>
                ))}
            </ScrollView>
        )
    }}
</BottomSheet>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions