From 4a2d139d9510690bb687ae54279d99b74b6494e4 Mon Sep 17 00:00:00 2001
From: Jules <jules@expensify.com>
Date: Tue, 12 Dec 2023 16:06:58 +0000
Subject: [PATCH] Merge pull request #32918 from
 shubham1206agra/fix-request-flow

Fix request flow

(cherry picked from commit d8b8182013cab742465092bc587e6aa9024c7768)
---
 src/pages/iou/request/step/IOURequestStepConfirmation.js | 2 +-
 src/pages/iou/request/step/IOURequestStepParticipants.js | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.js b/src/pages/iou/request/step/IOURequestStepConfirmation.js
index 859035606a31..60b3276e941e 100644
--- a/src/pages/iou/request/step/IOURequestStepConfirmation.js
+++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js
@@ -330,7 +330,7 @@ function IOURequestStepConfirmation({
                         // but not all of them (maybe someone skipped out on dinner). Then it's nice to be able to select/deselect people from the group chat bill
                         // split rather than forcing the user to create a new group, just for that expense. The reportID is empty, when the action was initiated from
                         // the floating-action-button (since it is something that exists outside the context of a report).
-                        canModifyParticipants={!_.isEmpty(report.reportID)}
+                        canModifyParticipants={!transaction.isFromGlobalCreate}
                         policyID={report.policyID}
                         bankAccountRoute={ReportUtils.getBankAccountRoute(report)}
                         iouMerchant={transaction.merchant}
diff --git a/src/pages/iou/request/step/IOURequestStepParticipants.js b/src/pages/iou/request/step/IOURequestStepParticipants.js
index d07f900dbb6f..5f5dbb7e6a83 100644
--- a/src/pages/iou/request/step/IOURequestStepParticipants.js
+++ b/src/pages/iou/request/step/IOURequestStepParticipants.js
@@ -57,7 +57,9 @@ function IOURequestStepParticipants({
             numberOfParticipants.current = val.length;
 
             // When multiple participants are selected, the reportID is generated at the end of the confirmation step.
+            // So we are resetting selectedReportID ref to the reportID coming from params.
             if (val.length !== 1) {
+                selectedReportID.current = reportID;
                 return;
             }