From 9c9168a1ea3feb1ca297a9552416cb341d4bd10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Musia=C5=82?= Date: Wed, 23 Jul 2025 11:16:17 +0200 Subject: [PATCH 1/2] Fix bottom padding on button with dropdown menu for andorid with button nav --- src/components/ButtonWithDropdownMenu/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ButtonWithDropdownMenu/index.tsx b/src/components/ButtonWithDropdownMenu/index.tsx index efa955a8a90b..962543744c7e 100644 --- a/src/components/ButtonWithDropdownMenu/index.tsx +++ b/src/components/ButtonWithDropdownMenu/index.tsx @@ -15,6 +15,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import mergeRefs from '@libs/mergeRefs'; import CONST from '@src/CONST'; import type {AnchorPosition} from '@src/styles'; +import useSafeAreaPaddings from '@hooks/useSafeAreaPaddings'; import type {ButtonWithDropdownMenuProps} from './types'; type ButtonWithDropdownMenuRef = { @@ -81,6 +82,8 @@ function ButtonWithDropdownMenuInner(props: ButtonWithDropdownMenuPr const nullCheckRef = (refParam: RefObject) => refParam ?? null; const shouldShowButtonRightIcon = !!options.at(0)?.shouldShowButtonRightIcon; + const {paddingBottom} = useSafeAreaPaddings(true) + useEffect(() => { if (!dropdownAnchor.current) { return; @@ -265,7 +268,7 @@ function ButtonWithDropdownMenuInner(props: ButtonWithDropdownMenuPr anchorRef={nullCheckRef(dropdownAnchor)} withoutOverlay shouldUseScrollView - scrollContainerStyle={!shouldUseModalPaddingStyle && isSmallScreenWidth && styles.pv4} + scrollContainerStyle={!shouldUseModalPaddingStyle && isSmallScreenWidth && {...styles.pt4, paddingBottom}} shouldUseModalPaddingStyle={shouldUseModalPaddingStyle} anchorAlignment={anchorAlignment} headerText={menuHeaderText} From 566f3400f524398ee614fa41ce7fdebc7ba5b1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Musia=C5=82?= Date: Wed, 23 Jul 2025 11:47:56 +0200 Subject: [PATCH 2/2] fix prettier --- src/components/ButtonWithDropdownMenu/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ButtonWithDropdownMenu/index.tsx b/src/components/ButtonWithDropdownMenu/index.tsx index 962543744c7e..4bdd73b08459 100644 --- a/src/components/ButtonWithDropdownMenu/index.tsx +++ b/src/components/ButtonWithDropdownMenu/index.tsx @@ -8,6 +8,7 @@ import * as Expensicons from '@components/Icon/Expensicons'; import PopoverMenu from '@components/PopoverMenu'; import useKeyboardShortcut from '@hooks/useKeyboardShortcut'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; +import useSafeAreaPaddings from '@hooks/useSafeAreaPaddings'; import useStyleUtils from '@hooks/useStyleUtils'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -15,7 +16,6 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import mergeRefs from '@libs/mergeRefs'; import CONST from '@src/CONST'; import type {AnchorPosition} from '@src/styles'; -import useSafeAreaPaddings from '@hooks/useSafeAreaPaddings'; import type {ButtonWithDropdownMenuProps} from './types'; type ButtonWithDropdownMenuRef = { @@ -82,7 +82,7 @@ function ButtonWithDropdownMenuInner(props: ButtonWithDropdownMenuPr const nullCheckRef = (refParam: RefObject) => refParam ?? null; const shouldShowButtonRightIcon = !!options.at(0)?.shouldShowButtonRightIcon; - const {paddingBottom} = useSafeAreaPaddings(true) + const {paddingBottom} = useSafeAreaPaddings(true); useEffect(() => { if (!dropdownAnchor.current) {