Skip to content

Commit 740f820

Browse files
authored
Merge pull request #90525 from software-mansion-labs/@GCyganek/landscape-mode/fix-pay-button-splits
Fix iOS - Expense - Pay button splits in half in landscape mode
2 parents 69fd95a + 431d261 commit 740f820

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/components/ButtonWithDropdownMenu

src/components/ButtonWithDropdownMenu/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function ButtonWithDropdownMenu<IValueType>({ref, ...props}: ButtonWithDropdownM
7777
const dropdownAnchor = useRef<View | null>(null);
7878
// We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to apply correct popover styles
7979
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
80-
const {isSmallScreenWidth, isInLandscapeMode} = useResponsiveLayout();
80+
const {isSmallScreenWidth} = useResponsiveLayout();
8181
const dropdownButtonRef = isSplitButton ? buttonRef : mergeRefs(buttonRef, dropdownAnchor);
8282
const selectedItem = options.at(selectedItemIndex) ?? options.at(0);
8383
const areAllOptionsDisabled = options.every((option) => option.disabled);
@@ -177,7 +177,7 @@ function ButtonWithDropdownMenu<IValueType>({ref, ...props}: ButtonWithDropdownM
177177
shouldStayNormalOnDisable={shouldStayNormalOnDisable}
178178
isLoading={isLoading}
179179
shouldRemoveRightBorderRadius
180-
style={isSplitButton ? [styles.pr0, isInLandscapeMode ? undefined : styles.flex1] : {}}
180+
style={isSplitButton ? [styles.pr0, styles.flexGrow1, styles.flexShrink1] : {}}
181181
extraSmall={buttonSize === CONST.DROPDOWN_BUTTON_SIZE.EXTRA_SMALL}
182182
large={buttonSize === CONST.DROPDOWN_BUTTON_SIZE.LARGE}
183183
medium={buttonSize === CONST.DROPDOWN_BUTTON_SIZE.MEDIUM}

0 commit comments

Comments
 (0)