diff --git a/packages/client/package.json b/packages/client/package.json index 78d92a9d8..0e33b3614 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -21,9 +21,9 @@ "@antv/g2plot": "^2.3.27", "@dnd-kit/core": "4.0.0-next-2021720152655", "@dnd-kit/sortable": "5.0.0-next-2021720152655", - "@formily/antd": "2.0.0-rc.3", - "@formily/core": "2.0.0-rc.3", - "@formily/react": "2.0.0-rc.3", + "@formily/antd": "2.0.0-rc.19", + "@formily/core": "2.0.0-rc.19", + "@formily/react": "2.0.0-rc.19", "@monaco-editor/react": "^4.2.1", "ahooks": "^2.10.2", "axios": "^0.21.1", diff --git a/packages/client/src/components/admin-layout/Collections/index.tsx b/packages/client/src/components/admin-layout/Collections/index.tsx index 3287dd45b..f7dc01f61 100644 --- a/packages/client/src/components/admin-layout/Collections/index.tsx +++ b/packages/client/src/components/admin-layout/Collections/index.tsx @@ -610,7 +610,7 @@ function CreateFieldButton() { key: uid(), name: `f_${uid()}`, interface: info.key, - }); + }, 'overwrite'); setProperties(clone(schema.properties)); setVisible(true); }} @@ -644,16 +644,16 @@ function CreateFieldButton() { title={t('Add field')} width={'50%'} visible={visible} - onClose={() => { + onClose={async () => { + await form.clearFormGraph(); setVisible(false); - form.reset(); }} footer={