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
  • Loading branch information
yuwenmemon authored Apr 2, 2024
2 parents 98066fd + 4ac2310 commit 008574a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,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 @@ -227,12 +229,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 008574a

Please sign in to comment.