Skip to content

Commit

Permalink
Merge pull request #35220 from s-alves10/fix/issue-34724
Browse files Browse the repository at this point in the history
fix: disable set modal visibility in waypoint edit page
  • Loading branch information
jasperhuangg authored Jan 29, 2024
2 parents ab395ee + 319d88f commit 1c19c54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/HeaderWithBackButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function HeaderWithBackButton({
shouldShowGetAssistanceButton = false,
shouldDisableGetAssistanceButton = false,
shouldShowPinButton = false,
shouldSetModalVisibility = true,
shouldShowThreeDotsButton = false,
shouldDisableThreeDotsButton = false,
stepCounter,
Expand Down Expand Up @@ -165,6 +166,7 @@ function HeaderWithBackButton({
onIconPress={onThreeDotsButtonPress}
anchorPosition={threeDotsAnchorPosition}
shouldOverlay={shouldOverlayDots}
shouldSetModalVisibility={shouldSetModalVisibility}
/>
)}
{shouldShowCloseButton && (
Expand Down
3 changes: 3 additions & 0 deletions src/components/HeaderWithBackButton/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ type HeaderWithBackButtonProps = Partial<ChildrenProps> & {
/** 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[];

Expand Down
2 changes: 2 additions & 0 deletions src/pages/iou/request/step/IOURequestStepWaypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ function IOURequestStepWaypoint({
Navigation.goBack(ROUTES.MONEY_REQUEST_DISTANCE_TAB.getRoute(iouType));
}}
shouldShowThreeDotsButton={shouldShowThreeDotsButton}
shouldSetModalVisibility={false}
threeDotsAnchorPosition={styles.threeDotsPopoverOffset(windowWidth)}
threeDotsMenuItems={[
{
Expand All @@ -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')}
Expand Down

0 comments on commit 1c19c54

Please sign in to comment.