react-native-bottom-sheet
react-native-bottom-sheet copied to clipboard
[v4] | [v2] enablePanDownToClose doesn't update dynamically
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>