Skip to content

Commit 37cc644

Browse files
authored
Merge pull request Expensify#66930 from software-mansion-labs/fix/button-with-dropdown-menu-bottom-padding
Fix bottom padding on button with dropdown menu for android with button navigation
2 parents 9712b01 + 566f340 commit 37cc644

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • src/components/ButtonWithDropdownMenu

src/components/ButtonWithDropdownMenu/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as Expensicons from '@components/Icon/Expensicons';
88
import PopoverMenu from '@components/PopoverMenu';
99
import useKeyboardShortcut from '@hooks/useKeyboardShortcut';
1010
import useResponsiveLayout from '@hooks/useResponsiveLayout';
11+
import useSafeAreaPaddings from '@hooks/useSafeAreaPaddings';
1112
import useStyleUtils from '@hooks/useStyleUtils';
1213
import useTheme from '@hooks/useTheme';
1314
import useThemeStyles from '@hooks/useThemeStyles';
@@ -81,6 +82,8 @@ function ButtonWithDropdownMenuInner<IValueType>(props: ButtonWithDropdownMenuPr
8182
const nullCheckRef = (refParam: RefObject<View | null>) => refParam ?? null;
8283
const shouldShowButtonRightIcon = !!options.at(0)?.shouldShowButtonRightIcon;
8384

85+
const {paddingBottom} = useSafeAreaPaddings(true);
86+
8487
useEffect(() => {
8588
if (!dropdownAnchor.current) {
8689
return;
@@ -265,7 +268,7 @@ function ButtonWithDropdownMenuInner<IValueType>(props: ButtonWithDropdownMenuPr
265268
anchorRef={nullCheckRef(dropdownAnchor)}
266269
withoutOverlay
267270
shouldUseScrollView
268-
scrollContainerStyle={!shouldUseModalPaddingStyle && isSmallScreenWidth && styles.pv4}
271+
scrollContainerStyle={!shouldUseModalPaddingStyle && isSmallScreenWidth && {...styles.pt4, paddingBottom}}
269272
shouldUseModalPaddingStyle={shouldUseModalPaddingStyle}
270273
anchorAlignment={anchorAlignment}
271274
headerText={menuHeaderText}

0 commit comments

Comments
 (0)