From ca46712ef6637c2c8313c6137cbef4593a4b1bbb Mon Sep 17 00:00:00 2001 From: Pavlo Tsimura Date: Fri, 15 Dec 2023 13:04:54 +0100 Subject: [PATCH] Retain hidden participants when creating an IOU request --- .../iou/request/step/IOURequestStepConfirmation.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepConfirmation.js b/src/pages/iou/request/step/IOURequestStepConfirmation.js index 1f458ef37f01..6d5375c7a1bb 100644 --- a/src/pages/iou/request/step/IOURequestStepConfirmation.js +++ b/src/pages/iou/request/step/IOURequestStepConfirmation.js @@ -80,13 +80,10 @@ function IOURequestStepConfirmation({ const headerTitle = iouType === CONST.IOU.TYPE.SPLIT ? translate('iou.split') : translate(TransactionUtils.getHeaderTitleTranslationKey(transaction)); const participants = useMemo( () => - _.chain(transaction.participants) - .map((participant) => { - const isPolicyExpenseChat = lodashGet(participant, 'isPolicyExpenseChat', false); - return isPolicyExpenseChat ? OptionsListUtils.getPolicyExpenseReportOption(participant) : OptionsListUtils.getParticipantsOption(participant, personalDetails); - }) - .filter((participant) => !!participant.login || !!participant.text) - .value(), + _.map(transaction.participants, (participant) => { + const isPolicyExpenseChat = lodashGet(participant, 'isPolicyExpenseChat', false); + return isPolicyExpenseChat ? OptionsListUtils.getPolicyExpenseReportOption(participant) : OptionsListUtils.getParticipantsOption(participant, personalDetails); + }), [transaction.participants, personalDetails], ); const isPolicyExpenseChat = useMemo(() => ReportUtils.isPolicyExpenseChat(ReportUtils.getRootParentReport(report)), [report]);