diff --git a/src/components/ImportSpreadsheetColumns.tsx b/src/components/ImportSpreadsheetColumns.tsx index 3faa2545ad90..d380e9e3cccd 100644 --- a/src/components/ImportSpreadsheetColumns.tsx +++ b/src/components/ImportSpreadsheetColumns.tsx @@ -28,7 +28,7 @@ type ImportSpreadsheetColumnsProps = { columnRoles?: ColumnRole[]; // A function to perform the import operation. - importFunction: () => void; + importFunction: () => void | Promise; // An optional Errors object containing any errors that may have occurred. errors?: Errors | null; @@ -65,6 +65,9 @@ function ImportSpreadsheetColumns({ const {isOffline} = useNetwork(); const [spreadsheet] = useOnyx(ONYXKEYS.IMPORTED_SPREADSHEET); const {containsHeader = true} = spreadsheet ?? {}; + const handleImport = () => { + importFunction(); + }; return ( <> @@ -117,7 +120,7 @@ function ImportSpreadsheetColumns({ >