Skip to content

Commit aa3e4d4

Browse files
committed
fix 63899
1 parent bb153eb commit aa3e4d4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/pages/Search/SearchTransactionsChangeReport.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {ListItem} from '@components/SelectionList/types';
55
import {changeTransactionsReport} from '@libs/actions/Transaction';
66
import Navigation from '@libs/Navigation/Navigation';
77
import IOURequestEditReportCommon from '@pages/iou/request/step/IOURequestEditReportCommon';
8+
import CONST from '@src/CONST';
89
import ONYXKEYS from '@src/ONYXKEYS';
910
import type {Report} from '@src/types/onyx';
1011

@@ -40,11 +41,22 @@ function SearchTransactionsChangeReport() {
4041
Navigation.goBack();
4142
};
4243

44+
const removeFromReport = () => {
45+
if (!transactionsReports || selectedTransactionsKeys.length === 0) {
46+
return;
47+
}
48+
changeTransactionsReport(selectedTransactionsKeys, CONST.REPORT.UNREPORTED_REPORT_ID);
49+
clearSelectedTransactions();
50+
Navigation.goBack();
51+
};
52+
4353
return (
4454
<IOURequestEditReportCommon
4555
backTo={undefined}
4656
transactionsReports={transactionsReports}
4757
selectReport={selectReport}
58+
removeFromReport={removeFromReport}
59+
isEditing
4860
/>
4961
);
5062
}

0 commit comments

Comments
 (0)