File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type {ListItem} from '@components/SelectionList/types';
55import { changeTransactionsReport } from '@libs/actions/Transaction' ;
66import Navigation from '@libs/Navigation/Navigation' ;
77import IOURequestEditReportCommon from '@pages/iou/request/step/IOURequestEditReportCommon' ;
8+ import CONST from '@src/CONST' ;
89import ONYXKEYS from '@src/ONYXKEYS' ;
910import 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}
You can’t perform that action at this time.
0 commit comments