This reverts commit cc71394863.
Regression introduced in https://github.com/twentyhq/twenty/pull/13213
The import/export use an upsert logic and when it goes through the
"update" path it fails due to the connect not being implemented yet
(should be in https://github.com/twentyhq/core-team-issues/issues/1230)
---------
Co-authored-by: prastoin <paul@twenty.com>
This commit is contained in:
+7
-3
@@ -10,7 +10,9 @@ import { useDialogManager } from '@/ui/feedback/dialog-manager/hooks/useDialogMa
|
||||
import { useStepBar } from '@/ui/navigation/step-bar/hooks/useStepBar';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
|
||||
export const defaultSpreadsheetImportProps: Partial<SpreadsheetImportProps> = {
|
||||
export const defaultSpreadsheetImportProps: Partial<
|
||||
SpreadsheetImportProps<any>
|
||||
> = {
|
||||
autoMapHeaders: true,
|
||||
allowInvalidSubmit: true,
|
||||
autoMapDistance: 2,
|
||||
@@ -26,11 +28,13 @@ export const defaultSpreadsheetImportProps: Partial<SpreadsheetImportProps> = {
|
||||
maxRecords: SpreadsheetMaxRecordImportCapacity,
|
||||
} as const;
|
||||
|
||||
export const SpreadsheetImport = (props: SpreadsheetImportProps) => {
|
||||
export const SpreadsheetImport = <T extends string>(
|
||||
props: SpreadsheetImportProps<T>,
|
||||
) => {
|
||||
const mergedProps = {
|
||||
...defaultSpreadsheetImportProps,
|
||||
...props,
|
||||
} as SpreadsheetImportProps;
|
||||
} as SpreadsheetImportProps<T>;
|
||||
|
||||
const { enqueueDialog } = useDialogManager();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user