Skip to content

Commit

Permalink
Merge pull request Expensify#31423 from dukenv0307/fix/30682
Browse files Browse the repository at this point in the history
Fix category is reset after refreshing
  • Loading branch information
Gonals authored Nov 17, 2023
2 parents 9fc8d7a + 5f43123 commit b61a300
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -2936,6 +2936,8 @@ function navigateToNextPage(iou, iouType, report, path = '') {
.map((accountID) => ({accountID, selected: true}))
.value();
setMoneyRequestParticipants(participants);
resetMoneyRequestCategory();
resetMoneyRequestTag();
}
Navigation.navigate(ROUTES.MONEY_REQUEST_CONFIRMATION.getRoute(iouType, report.reportID));
return;
Expand Down
5 changes: 0 additions & 5 deletions src/pages/iou/steps/MoneyRequestConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ function MoneyRequestConfirmPage(props) {
const isPolicyExpenseChat = useMemo(() => ReportUtils.isPolicyExpenseChat(ReportUtils.getRootParentReport(props.report)), [props.report]);
const isManualRequestDM = props.selectedTab === CONST.TAB.MANUAL && iouType === CONST.IOU.TYPE.REQUEST;

useEffect(() => {
IOU.resetMoneyRequestCategory();
IOU.resetMoneyRequestTag();
}, []);

useEffect(() => {
const policyExpenseChat = _.find(participants, (participant) => participant.isPolicyExpenseChat);
if (policyExpenseChat) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ function MoneyRequestParticipantsPage({iou, selectedTab, route, transaction}) {

const navigateToConfirmationStep = (moneyRequestType) => {
IOU.setMoneyRequestId(moneyRequestType);
IOU.resetMoneyRequestCategory();
IOU.resetMoneyRequestTag();
Navigation.navigate(ROUTES.MONEY_REQUEST_CONFIRMATION.getRoute(moneyRequestType, reportID));
};

Expand Down

0 comments on commit b61a300

Please sign in to comment.