You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 00:26:02