From 0f1115b058bf91c3403ad9f09e8f5b6ae841d198 Mon Sep 17 00:00:00 2001 From: chenos Date: Wed, 6 Mar 2024 23:05:16 +0800 Subject: [PATCH] fix(create-action): invalid save mode --- packages/core/client/src/block-provider/hooks/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index 3162fe9da..051ac5463 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -10,7 +10,6 @@ import { useNavigate } from 'react-router-dom'; import { useReactToPrint } from 'react-to-print'; import { AssociationFilter, - useCollectionManager, useCollectionRecord, useDataSourceHeaders, useFormActiveFields, @@ -194,7 +193,7 @@ export const useCreateActionProps = () => { const { t } = useTranslation(); const { updateAssociationValues } = useFormBlockContext(); const collectValues = useCollectValuesToSubmit(); - const action = record.isNew ? 'create' : 'update'; + const action = record.isNew ? actionField.componentProps.saveMode || 'create' : 'update'; const filterKeys = actionField.componentProps.filterKeys?.checked || []; return { async onClick() {