From 824629b7fea921a1bc6289339d82d980445c1785 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Fri, 28 Apr 2023 13:35:45 +0800 Subject: [PATCH] chore: associate field --- .../core/client/src/collection-manager/interfaces/o2m.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/collection-manager/interfaces/o2m.tsx b/packages/core/client/src/collection-manager/interfaces/o2m.tsx index 09bd6deff7..b16349d049 100644 --- a/packages/core/client/src/collection-manager/interfaces/o2m.tsx +++ b/packages/core/client/src/collection-manager/interfaces/o2m.tsx @@ -1,5 +1,6 @@ import { ISchema } from '@formily/react'; import { cloneDeep } from 'lodash'; +import { uid } from '@formily/shared'; import { constraintsProps, recordPickerSelector, @@ -111,7 +112,7 @@ export const o2m: IField = { type: 'object', properties: { block: { - type: 'void', + type: 'object', 'x-decorator': 'SubFormProvider', 'x-decorator-props': { collection: field.target, @@ -126,7 +127,7 @@ export const o2m: IField = { bordered: true, }, properties: { - [field.name]: { + [uid()]: { type: 'object', 'x-component': 'FormV2', 'x-component-props': {