Skip to content

Commit 442ff83

Browse files
committed
fix: reset stateful report actions on recycle
1 parent 0bdb3ce commit 442ff83

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/pages/inbox/report/MoneyReportContentCreated.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ function MoneyReportContentCreated({report, policy, transaction, transactionThre
7676
<ShowContextMenuActionsContext.Provider value={contextMenuActionsValue}>
7777
<View>
7878
<MoneyRequestView
79+
key={action?.reportActionID ?? transactionThreadReport?.reportID}
7980
transactionThreadReport={transactionThreadReport}
8081
parentReportID={transactionThreadReport?.parentReportID}
8182
expensePolicy={policy}

src/pages/inbox/report/ReportActionItemContentCreated.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ function ReportActionItemContentCreated({parentReportAction, transactionID, draf
103103
<ShowContextMenuActionsContext.Provider value={contextMenuActionsValue}>
104104
<View>
105105
<MoneyRequestView
106+
key={action?.reportActionID ?? report?.reportID}
106107
transactionThreadReport={report}
107108
parentReportID={report?.parentReportID}
108109
expensePolicy={policy}

src/pages/inbox/report/actionContents/ActionContentRouter.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ function ActionContentRouter({
211211
if (action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW) {
212212
return (
213213
<MoneyRequestReportPreview
214+
key={action.reportActionID}
214215
iouReportID={getIOUReportIDFromReportActionPreview(action)}
215216
iouReport={iouReport}
216217
policyID={policyID}

src/pages/inbox/report/actionContents/ChatMessageContent.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ function ChatMessageContent({action, policyID, reportID, originalReportID, displ
7373
<AttachmentContext.Provider value={attachmentContextValue}>
7474
{isEditingInline ? (
7575
<ReportActionItemMessageEdit
76+
key={action.reportActionID}
7677
action={action}
7778
reportID={reportID}
7879
originalReportID={originalReportID}

0 commit comments

Comments
 (0)