Skip to content

Commit

Permalink
Merge pull request #39383 from nexarvo/fix/39320
Browse files Browse the repository at this point in the history
fix: Split btn for single contact became inactive when returned from final review
(cherry picked from commit 008574a)
  • Loading branch information
yuwenmemon authored and OSBotify committed Apr 2, 2024
1 parent 6b3470c commit 0b6973e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({
{
..._.pick(option, 'accountID', 'login', 'isPolicyExpenseChat', 'reportID', 'searchText'),
selected: true,
iouType,
},
]);
onFinish();
},
// eslint-disable-next-line react-hooks/exhaustive-deps -- we don't want to trigger this callback when iouType changes
[onFinish, onParticipantsAdded],
);

Expand Down Expand Up @@ -235,12 +237,14 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({
reportID: option.reportID,
selected: true,
searchText: option.searchText,
iouType: iouType === CONST.IOU.TYPE.REQUEST ? CONST.IOU.TYPE.SPLIT : iouType,
},
];
}

onParticipantsAdded(newSelectedOptions, newSelectedOptions.length !== 0 ? CONST.IOU.TYPE.SPLIT : undefined);
},
// eslint-disable-next-line react-hooks/exhaustive-deps -- we don't want to trigger this callback when iouType changes
[participants, onParticipantsAdded],
);

Expand Down

0 comments on commit 0b6973e

Please sign in to comment.