react-native-bottom-sheet icon indicating copy to clipboard operation
react-native-bottom-sheet copied to clipboard

[v4] | [v2] enablePanDownToClose not work with List on 4.4.3 version on IOS devices

Open 7maucdn opened this issue 3 years ago • 4 comments

Bug

With the example project of this library 4.4.3 version. On iOS devices, all of the basic List with enablePanDownToClose == true (prop of BottomSheetModal/BottomSheet) doesn't work.

Environment info

Library Version
@gorhom/bottom-sheet latest
react-native latest
react-native-reanimated latest
react-native-gesture-handler latest

Steps To Reproduce

  1. Open react-native-bottom-sheet example project
  2. Open FlatListoption on Basic section
  3. Scroll from top to bottom of the FlatList

Describe what you expected to happen:

1.On iOS When scroll down FlatList or VirtualizedList inside BottomSheetModal/BottomSheet will close the BottomSheet 2..

Reproducible sample code

<View style={styles.container}>
      <BottomSheet
        ref={bottomSheetRef}
        index={1}
        snapPoints={snapPoints}
        onChange={handleSheetChanges}
        enablePanDownToClose={true}
      >
        <FlatList ..props />
      </BottomSheet>
    </View>

7maucdn avatar Aug 05 '22 04:08 7maucdn

I can confirm this issue, but its not the bottom sheet version which causes the issue, it's more likely react native 0.69, reanimated 2.9.1 or react native gesture handler 2.5.0 or react-native-screens. Specially RNS had some huge gesture recognizer updates

hirbod avatar Aug 11 '22 20:08 hirbod

@7maucdn is this happening with Expo or a project without Expo?

hirbod avatar Aug 13 '22 11:08 hirbod

Gorhom and I invested a decent amount of time for this issue. It's related to Expo and ONLY happens in Dev mode. As soon as you build a release, the pan down to close feature works. So while it's annoying right now to test the features, they work when you create a release build

https://github.com/software-mansion/react-native-gesture-handler/issues/2169

hirbod avatar Aug 13 '22 14:08 hirbod

Fixed in expo-dev-client v1.2.1 as noted in the issue that @hirbod linked to.

ansh avatar Sep 04 '22 00:09 ansh

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 04 '22 09:10 github-actions[bot]

I am using react-native cli and "@gorhom/bottom-sheet": "^4.6.1". i am using BottomSheetModal and FlatList inside it and enablePanDownToClose is not working. It works if I use BottomSheetFlatList. But, I want to use onScroll event and I cannot find onScroll in BottomSheetFlatList.

KhimGurung avatar Apr 23 '24 08:04 KhimGurung