feat: add enabled prop to draggable view
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.
@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.
@gorhom, do you plan to merge it, or is there a better solution that will be presented in future releases?
any update on the merge status ?
any news about that @gorhom @geovie @IslamRustamov ?