@@ -121,9 +121,8 @@ function SearchPage({route}: SearchPageProps) {
121121 const reportIDList = selectedReports ?. filter ( ( report ) => ! ! report ) . map ( ( report ) => report . reportID ) ?? [ ] ;
122122 queueExportSearchWithTemplate ( { templateName, templateType, jsonQuery : '{}' , reportIDList, transactionIDList : selectedTransactionsKeys , policyID} ) ;
123123 }
124- clearSelectedTransactions ( ) ;
125124 } ,
126- [ queryJSON , selectedReports , selectedTransactionsKeys , clearSelectedTransactions , areAllMatchingItemsSelected ] ,
125+ [ queryJSON , selectedReports , selectedTransactionsKeys , areAllMatchingItemsSelected ] ,
127126 ) ;
128127
129128 const headerButtonsOptions = useMemo ( ( ) => {
@@ -170,9 +169,11 @@ function SearchPage({route}: SearchPageProps) {
170169 {
171170 text : translate ( 'export.expenseLevelExport' ) ,
172171 icon : Expensicons . Table ,
173- onSelected : ( ) =>
172+ onSelected : ( ) => {
174173 // The report level export template is not policy specific, so we don't need to pass a policyID
175- beginExportWithTemplate ( CONST . REPORT . EXPORT_OPTIONS . EXPENSE_LEVEL_EXPORT , CONST . EXPORT_TEMPLATE_TYPES . INTEGRATIONS , undefined ) ,
174+ beginExportWithTemplate ( CONST . REPORT . EXPORT_OPTIONS . EXPENSE_LEVEL_EXPORT , CONST . EXPORT_TEMPLATE_TYPES . INTEGRATIONS , undefined ) ;
175+ clearSelectedTransactions ( undefined , true ) ;
176+ } ,
176177 } ,
177178 ] ;
178179
@@ -187,9 +188,11 @@ function SearchPage({route}: SearchPageProps) {
187188 exportOptions . push ( {
188189 text : translate ( 'export.reportLevelExport' ) ,
189190 icon : Expensicons . Table ,
190- onSelected : ( ) =>
191+ onSelected : ( ) => {
191192 // The report level export template is not policy specific, so we don't need to pass a policyID
192- beginExportWithTemplate ( CONST . REPORT . EXPORT_OPTIONS . REPORT_LEVEL_EXPORT , CONST . EXPORT_TEMPLATE_TYPES . INTEGRATIONS , undefined ) ,
193+ beginExportWithTemplate ( CONST . REPORT . EXPORT_OPTIONS . REPORT_LEVEL_EXPORT , CONST . EXPORT_TEMPLATE_TYPES . INTEGRATIONS , undefined ) ;
194+ clearSelectedTransactions ( undefined , true ) ;
195+ } ,
193196 } ) ;
194197 }
195198
0 commit comments