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

[v4] | [v2] enablePanDownToClose doesn't update dynamically

Open dima-vantage opened this issue 1 year ago • 0 comments

Bug

Environment info

Library Version
@gorhom/bottom-sheet ^4.6.1
react-native 0.69.12
react-native-reanimated ^2.17.0
react-native-gesture-handler ^1.10.3

Steps To Reproduce

When passing enablePanDownToClose as a conditional prop it doesn't work, only remember the initial value.

Reproducible sample code

<BottomSheetModal
        ref={ref}
        index={index}
        snapPoints={snapPoints}
        onChange={handleSheetChanges}
        backdropComponent={renderBackdrop}
        enablePanDownToClose={!blocked}
      >
        {children}
      </BottomSheetModal>

dima-vantage avatar Apr 17 '24 12:04 dima-vantage