@@ -15,6 +15,7 @@ import mergeRefs from '@libs/mergeRefs';
1515import CONST from '@src/CONST' ;
1616import type { AnchorPosition } from '@src/styles' ;
1717import type { ButtonWithDropdownMenuProps } from './types' ;
18+ import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
1819
1920function ButtonWithDropdownMenu < IValueType > ( {
2021 success = true ,
@@ -60,6 +61,7 @@ function ButtonWithDropdownMenu<IValueType>({
6061 const [ popoverAnchorPosition , setPopoverAnchorPosition ] = useState < AnchorPosition | null > ( defaultPopoverAnchorPosition ) ;
6162 const { windowWidth, windowHeight} = useWindowDimensions ( ) ;
6263 const dropdownAnchor = useRef < View | null > ( null ) ;
64+ const { shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
6365 // eslint-disable-next-line react-compiler/react-compiler
6466 const dropdownButtonRef = isSplitButton ? buttonRef : mergeRefs ( buttonRef , dropdownAnchor ) ;
6567 const selectedItem = options . at ( selectedItemIndex ) ?? options . at ( 0 ) ;
@@ -229,7 +231,7 @@ function ButtonWithDropdownMenu<IValueType>({
229231 anchorRef = { nullCheckRef ( dropdownAnchor ) }
230232 withoutOverlay
231233 shouldUseScrollView
232- scrollContainerStyle = { styles . pv4 }
234+ scrollContainerStyle = { shouldUseNarrowLayout ? styles . pv4 : undefined }
233235 shouldUseModalPaddingStyle = { false }
234236 anchorAlignment = { anchorAlignment }
235237 headerText = { menuHeaderText }
0 commit comments