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

feat: add enabled prop to draggable view

Open geovie opened this issue 10 months ago • 4 comments

Motivation

The PR adds a simple enabled flag to BottomSheetDraggableView which sets the enabled flag on the gesture.
Previously enableContentPanningGesture was accessed via useBottomSheetInternal.

By allowing to set the enabled flag on the component directly it is now possible to use BottomSheetDraggableView even if the enableContentPanningGesture of the BottomSheet is set to false and so BottomSheetDraggableView can be used to only make part of the sheet's content draggable.

Another side effect is the removal of:

const DraggableView = enableContentPanningGesture
     ? BottomSheetDraggableView
     : Animated.View;

which previously caused a remount of the content when enableContentPanningGesture was changed.

geovie avatar Feb 13 '25 16:02 geovie

@gorhom when do you plan to release this change? Since I'm facing an issue that this exact PR fixes and need to know whether I should patch it locally or wait for a new release.

IslamRustamov avatar Mar 11 '25 14:03 IslamRustamov

@gorhom, do you plan to merge it, or is there a better solution that will be presented in future releases?

bestofaIl avatar Jul 30 '25 10:07 bestofaIl

any update on the merge status ?

Uziniii avatar Aug 28 '25 00:08 Uziniii

any news about that @gorhom @geovie @IslamRustamov ?

gomezger avatar Oct 22 '25 19:10 gomezger