@@ -9,6 +9,7 @@ import useKeyboardShortcut from '@hooks/useKeyboardShortcut';
9
9
import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
10
10
import useTheme from '@hooks/useTheme' ;
11
11
import useThemeStyles from '@hooks/useThemeStyles' ;
12
+ import useWindowDimensions from '@hooks/useWindowDimensions' ;
12
13
import * as Browser from '@libs/Browser' ;
13
14
import * as Modal from '@userActions/Modal' ;
14
15
import CONST from '@src/CONST' ;
@@ -135,6 +136,7 @@ function PopoverMenu({
135
136
const [ currentMenuItems , setCurrentMenuItems ] = useState ( menuItems ) ;
136
137
const currentMenuItemsFocusedIndex = currentMenuItems ?. findIndex ( ( option ) => option . isSelected ) ;
137
138
const [ enteredSubMenuIndexes , setEnteredSubMenuIndexes ] = useState < readonly number [ ] > ( CONST . EMPTY_ARRAY ) ;
139
+ const { windowHeight} = useWindowDimensions ( ) ;
138
140
139
141
const [ focusedIndex , setFocusedIndex ] = useArrowKeyFocusManager ( { initialFocusedIndex : currentMenuItemsFocusedIndex , maxIndex : currentMenuItems . length - 1 , isActive : isVisible } ) ;
140
142
@@ -256,7 +258,7 @@ function PopoverMenu({
256
258
restoreFocusType = { restoreFocusType }
257
259
>
258
260
< FocusTrapForModal active = { isVisible } >
259
- < ScrollView style = { isSmallScreenWidth ? { } : styles . createMenuContainer } >
261
+ < ScrollView style = { isSmallScreenWidth ? { maxHeight : windowHeight - 250 } : styles . createMenuContainer } >
260
262
{ renderHeaderText ( ) }
261
263
{ enteredSubMenuIndexes . length > 0 && renderBackButtonItem ( ) }
262
264
{ currentMenuItems . map ( ( item , menuIndex ) => (
0 commit comments