From 6bc4434d639b48a96866dffb35b67cda444c8bad Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Mon, 25 Sep 2023 09:43:22 +0800 Subject: [PATCH] fix: form-data-template failed to clear option (#2709) --- .../core/client/src/schema-component/antd/form-v2/Templates.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx b/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx index 73e14b2e9..34160ca9e 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/Templates.tsx @@ -176,7 +176,7 @@ export const Templates = ({ style = {}, form }) => { filter: template?.dataScope, }, }} - onChange={(value) => handleTemplateDataChange(value.id, { ...value, ...template })} + onChange={(value) => handleTemplateDataChange(value?.id, { ...value, ...template })} targetField={getCollectionJoinField(`${template?.collection}.${template.titleField}`)} /> )}