|
1 | 1 | import React, {useCallback, useContext, useMemo, useState} from 'react';
|
2 |
| -import type {ReportActionListItemType, ReportListItemType, TransactionListItemType} from '@components/SelectionList/types'; |
| 2 | +import type {ReportListItemType, TransactionListItemType} from '@components/SelectionList/types'; |
3 | 3 | import {isMoneyRequestReport} from '@libs/ReportUtils';
|
4 | 4 | import {isReportListItemType, isTransactionListItemType} from '@libs/SearchUIUtils';
|
5 | 5 | import CONST from '@src/CONST';
|
@@ -27,7 +27,7 @@ const defaultSearchContext: SearchContext = {
|
27 | 27 |
|
28 | 28 | const Context = React.createContext<SearchContext>(defaultSearchContext);
|
29 | 29 |
|
30 |
| -function getReportsFromSelectedTransactions(data: TransactionListItemType[] | ReportListItemType[] | ReportActionListItemType[], selectedTransactions: SelectedTransactions) { |
| 30 | +function getReportsFromSelectedTransactions(data: TransactionListItemType[] | ReportListItemType[], selectedTransactions: SelectedTransactions) { |
31 | 31 | if (data.length === 0) {
|
32 | 32 | return [];
|
33 | 33 | }
|
@@ -81,7 +81,7 @@ function SearchContextProvider({children}: ChildrenProps) {
|
81 | 81 | }));
|
82 | 82 | }, []);
|
83 | 83 |
|
84 |
| - const setSelectedTransactions = useCallback((selectedTransactions: SelectedTransactions, data: TransactionListItemType[] | ReportListItemType[] | ReportActionListItemType[]) => { |
| 84 | + const setSelectedTransactions = useCallback((selectedTransactions: SelectedTransactions, data: TransactionListItemType[] | ReportListItemType[]) => { |
85 | 85 | // When selecting transactions, we also need to manage the reports to which these transactions belong. This is done to ensure proper exporting to CSV.
|
86 | 86 | const selectedReports = getReportsFromSelectedTransactions(data, selectedTransactions);
|
87 | 87 |
|
|
0 commit comments