Skip to content

Commit 9c9168a

Browse files
committed
Fix bottom padding on button with dropdown menu for andorid with button nav
1 parent aa28688 commit 9c9168a

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
@@ -15,6 +15,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions';
1515
import mergeRefs from '@libs/mergeRefs';
1616
import CONST from '@src/CONST';
1717
import type {AnchorPosition} from '@src/styles';
18+
import useSafeAreaPaddings from '@hooks/useSafeAreaPaddings';
1819
import type {ButtonWithDropdownMenuProps} from './types';
1920

2021
type ButtonWithDropdownMenuRef = {
@@ -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)