diff --git a/src/components/HeaderWithBackButton/index.tsx b/src/components/HeaderWithBackButton/index.tsx index a0f24b06db7f..2d5ad0c45536 100755 --- a/src/components/HeaderWithBackButton/index.tsx +++ b/src/components/HeaderWithBackButton/index.tsx @@ -39,6 +39,7 @@ function HeaderWithBackButton({ shouldShowGetAssistanceButton = false, shouldDisableGetAssistanceButton = false, shouldShowPinButton = false, + shouldSetModalVisibility = true, shouldShowThreeDotsButton = false, shouldDisableThreeDotsButton = false, stepCounter, @@ -165,6 +166,7 @@ function HeaderWithBackButton({ onIconPress={onThreeDotsButtonPress} anchorPosition={threeDotsAnchorPosition} shouldOverlay={shouldOverlayDots} + shouldSetModalVisibility={shouldSetModalVisibility} /> )} {shouldShowCloseButton && ( diff --git a/src/components/HeaderWithBackButton/types.ts b/src/components/HeaderWithBackButton/types.ts index 725d14e041a7..88f7e717a44d 100644 --- a/src/components/HeaderWithBackButton/types.ts +++ b/src/components/HeaderWithBackButton/types.ts @@ -61,6 +61,9 @@ type HeaderWithBackButtonProps = Partial & { /** Whether we should disable threedots button */ shouldDisableThreeDotsButton?: boolean; + /** Whether we should set modal visibility when three dot menu opens */ + shouldSetModalVisibility?: boolean; + /** List of menu items for more(three dots) menu */ threeDotsMenuItems?: ThreeDotsMenuItem[]; diff --git a/src/pages/iou/request/step/IOURequestStepWaypoint.js b/src/pages/iou/request/step/IOURequestStepWaypoint.js index 1087018eeed9..4c35951bc297 100644 --- a/src/pages/iou/request/step/IOURequestStepWaypoint.js +++ b/src/pages/iou/request/step/IOURequestStepWaypoint.js @@ -203,6 +203,7 @@ function IOURequestStepWaypoint({ Navigation.goBack(ROUTES.MONEY_REQUEST_DISTANCE_TAB.getRoute(iouType)); }} shouldShowThreeDotsButton={shouldShowThreeDotsButton} + shouldSetModalVisibility={false} threeDotsAnchorPosition={styles.threeDotsPopoverOffset(windowWidth)} threeDotsMenuItems={[ { @@ -217,6 +218,7 @@ function IOURequestStepWaypoint({ isVisible={isDeleteStopModalOpen} onConfirm={deleteStopAndHideModal} onCancel={() => setIsDeleteStopModalOpen(false)} + shouldSetModalVisibility={false} prompt={translate('distance.deleteWaypointConfirmation')} confirmText={translate('common.delete')} cancelText={translate('common.cancel')}