diff --git a/src/CONST/index.ts b/src/CONST/index.ts index 862151c02a73..3f1a673b7782 100755 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -238,6 +238,7 @@ const CONST = { POPOVER_DATE_MAX_HEIGHT: 366, POPOVER_DATE_MIN_HEIGHT: 322, TOOLTIP_ANIMATION_DURATION: 500, + DROPDOWN_SCROLL_THRESHOLD: 5, // Multiplier for gyroscope animation in order to make it a bit more subtle ANIMATION_GYROSCOPE_VALUE: 0.4, ANIMATION_PAID_DURATION: 200, diff --git a/src/components/MoneyReportHeaderKYCDropdown.tsx b/src/components/MoneyReportHeaderKYCDropdown.tsx index dad738ebc948..9e97ce72fc8f 100644 --- a/src/components/MoneyReportHeaderKYCDropdown.tsx +++ b/src/components/MoneyReportHeaderKYCDropdown.tsx @@ -67,7 +67,7 @@ function MoneyReportHeaderKYCDropdown({ }} buttonRef={buttonRef} shouldAlwaysShowDropdownMenu - shouldPopoverUseScrollView={applicableSecondaryActions.length >= 5} + shouldPopoverUseScrollView={applicableSecondaryActions.length >= CONST.DROPDOWN_SCROLL_THRESHOLD} customText={translate('common.more')} options={applicableSecondaryActions} isSplitButton={false} diff --git a/src/components/SettlementButton/index.tsx b/src/components/SettlementButton/index.tsx index 094853b2390a..57ec3ed4ef59 100644 --- a/src/components/SettlementButton/index.tsx +++ b/src/components/SettlementButton/index.tsx @@ -629,7 +629,7 @@ function SettlementButton({ }} style={style} shouldUseShortForm={shouldUseShortForm} - shouldPopoverUseScrollView={paymentButtonOptions.length > 5} + shouldPopoverUseScrollView={paymentButtonOptions.length >= CONST.DROPDOWN_SCROLL_THRESHOLD} containerStyles={paymentButtonOptions.length > 5 ? styles.settlementButtonListContainer : {}} wrapperStyle={[wrapperStyle, shouldLimitWidth ? styles.settlementButtonShortFormWidth : {}]} disabledStyle={disabledStyle} diff --git a/src/pages/Search/SearchSelectedNarrow.tsx b/src/pages/Search/SearchSelectedNarrow.tsx index e7896830b95f..b46795784b9a 100644 --- a/src/pages/Search/SearchSelectedNarrow.tsx +++ b/src/pages/Search/SearchSelectedNarrow.tsx @@ -74,6 +74,7 @@ function SearchSelectedNarrow({options, itemsLength, currentSelectedPolicyID, cu shouldAlwaysShowDropdownMenu isDisabled={options.length === 0} onPress={() => null} + shouldPopoverUseScrollView={options.length >= CONST.DROPDOWN_SCROLL_THRESHOLD} onOptionSelected={(item) => handleOnMenuItemPress(item)} onSubItemSelected={(subItem) => handleBulkPayItemSelected({