gorhom/react-native-bottom-sheet的BottomSheetScrollView滚动异常问询
使用gorhom/react-native-bottom-sheet时BottomSheetScrollView无法滚动到底的问题
问题现象
- 缓慢将底部面板向上拖动至第二个锚点(snapPoint),再拖动至第三个锚点后,BottomSheetScrollView无法滚动至内容末尾
- 组件挂载后直接快速拖动至最后一个/第三个锚点,滚动功能正常
已尝试的操作
- 使用仅内部嵌套BottomSheetScrollView的简易BottomSheet组件
- 设置静态锚点:
const snapPoints = useMemo(() => ['60%', '88%', '100%'], []); - 缓慢向上拖动BottomSheet时,BottomSheetScrollView会卡在特定高度
预期结果
BottomSheetScrollView应始终能滚动至内容底部
示例代码
<BottomSheet ref={bottomSheetRef} snapPoints={snapPoints} index={0} handleComponent={() => null} onChange={handleSheetChanges} backgroundComponent={props => <BottomSheetBackground {...props} />} handleIndicatorStyle={{ backgroundColor: 'rgba(235, 236, 240, 1)', }}> <BottomSheetScrollView showsVerticalScrollIndicator={false} style={{ zIndex: 1, flex: 1 }}> <Pressable> {props.children} </Pressable> </BottomSheetScrollView> </BottomSheet>
内容的提问来源于stack exchange,提问作者Ali Ibraheem
相关产品推荐
相关产品推荐

