From 167d0c657991704a8efd31522d18a5d90833ff84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Espino=20Garc=C3=ADa?= Date: Thu, 25 Sep 2025 18:20:26 +0200 Subject: [PATCH] Fix playbooks bottom sheet not scrolling on ipad (#9137) * Fix playbooks bottom sheet not scrolling on ipad * Address copilot feedback --- app/screens/bottom_sheet/index.tsx | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/app/screens/bottom_sheet/index.tsx b/app/screens/bottom_sheet/index.tsx index de8cdd072..ea0589d39 100644 --- a/app/screens/bottom_sheet/index.tsx +++ b/app/screens/bottom_sheet/index.tsx @@ -10,6 +10,7 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context'; import {Events} from '@constants'; import {useTheme} from '@context/theme'; import useAndroidHardwareBackHandler from '@hooks/android_back_handler'; +import {useBottomSheetListsFix} from '@hooks/bottom_sheet_lists_fix'; import {useIsTablet} from '@hooks/device'; import useNavButtonPressed from '@hooks/navigation_button_pressed'; import SecurityManager from '@managers/security_manager'; @@ -110,6 +111,8 @@ const BottomSheet = ({ const interaction = useRef(); const timeoutRef = useRef(); + const {enabled, panResponder} = useBottomSheetListsFix(); + const animationConfigs = useMemo(() => ({ ...animatedConfig, reduceMotion: reducedMotion ? ReduceMotion.Always : ReduceMotion.Never, @@ -205,15 +208,30 @@ const BottomSheet = ({ ); + const scrollViewProps = { + style: styles.view, + showsVerticalScrollIndicator: false, + scrollEnabled: enabled, + ...panResponder.panHandlers, + }; + if (isTablet) { const FooterComponent = footerComponent; + let content = renderContainerContent(); + if (scrollable) { + content = ( + + {content} + + ); + } return ( - {renderContainerContent()} + {content} {FooterComponent && ()} ); @@ -221,14 +239,10 @@ const BottomSheet = ({ let content; if (scrollable) { - const Scroll = isTablet ? ScrollView : BottomSheetScrollView; content = ( - + {renderContainerContent()} - + ); } else { content = (