From 16f6c20088d91f7c709a307161ef82a926ddab93 Mon Sep 17 00:00:00 2001 From: Aldo Canepa Date: Fri, 2 Aug 2024 16:34:17 -0700 Subject: [PATCH 1/2] Wrap in Modal.close callback to fix IOS --- src/pages/iou/request/step/IOURequestStepWaypoint.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepWaypoint.tsx b/src/pages/iou/request/step/IOURequestStepWaypoint.tsx index d93e5b3eb9f0..301c563feb71 100644 --- a/src/pages/iou/request/step/IOURequestStepWaypoint.tsx +++ b/src/pages/iou/request/step/IOURequestStepWaypoint.tsx @@ -24,6 +24,7 @@ import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; import * as ValidationUtils from '@libs/ValidationUtils'; import * as Transaction from '@userActions/Transaction'; +import * as Modal from '@userActions/Modal'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -178,8 +179,10 @@ function IOURequestStepWaypoint({ icon: Expensicons.Trashcan, text: translate('distance.deleteWaypoint'), onSelected: () => { - setRestoreFocusType(undefined); - setIsDeleteStopModalOpen(true); + Modal.close(() => { + setRestoreFocusType(undefined); + setIsDeleteStopModalOpen(true); + }); }, }, ]} From ac58c5c37a6b779e9b2eda3246549ec66b05ac89 Mon Sep 17 00:00:00 2001 From: Aldo Canepa Date: Fri, 2 Aug 2024 16:53:12 -0700 Subject: [PATCH 2/2] Lint --- src/pages/iou/request/step/IOURequestStepWaypoint.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/request/step/IOURequestStepWaypoint.tsx b/src/pages/iou/request/step/IOURequestStepWaypoint.tsx index 301c563feb71..d3d7e3ba12cd 100644 --- a/src/pages/iou/request/step/IOURequestStepWaypoint.tsx +++ b/src/pages/iou/request/step/IOURequestStepWaypoint.tsx @@ -23,8 +23,8 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; import * as ValidationUtils from '@libs/ValidationUtils'; -import * as Transaction from '@userActions/Transaction'; import * as Modal from '@userActions/Modal'; +import * as Transaction from '@userActions/Transaction'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS';