From ab2be60ed47de296b4e59669aaaab9603d806f7e Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Mon, 29 Sep 2025 08:42:33 +0300 Subject: [PATCH] Fix playbooks bottom sheet not scrolling on ipad (#9137) (#9166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix playbooks bottom sheet not scrolling on ipad * Address copilot feedback (cherry picked from commit 167d0c657991704a8efd31522d18a5d90833ff84) Co-authored-by: Daniel Espino GarcĂ­a --- 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 = (