diff --git a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx
index 18010e79b9..a559f5b01d 100644
--- a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx
+++ b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx
@@ -230,7 +230,6 @@ const SortableRow = (props) => {
? classObj.topActiveClass
: classObj.bottomActiveClass;
- console.log('active?.id !== id', active?.id, id, active?.id !== id);
return (
{
+ if (!s) {
+ return;
+ }
if (!s['x-uid']) {
s['x-uid'] = uid();
}
diff --git a/packages/core/client/src/schema-initializer/buttons/RecordBlockInitializers.tsx b/packages/core/client/src/schema-initializer/buttons/RecordBlockInitializers.tsx
index e9feca2c94..ffe6211a97 100644
--- a/packages/core/client/src/schema-initializer/buttons/RecordBlockInitializers.tsx
+++ b/packages/core/client/src/schema-initializer/buttons/RecordBlockInitializers.tsx
@@ -178,7 +178,7 @@ function useRecordBlocks() {
if (fromOthersInPopup) {
return templateWrapCollection(templateSchema, { item, fromOthersInPopup });
}
- templateWrap(templateSchema, { item });
+ return templateWrap(templateSchema, { item });
},
showAssociationFields: true,
};
diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts
index 686ff26b7c..3ba7765155 100644
--- a/packages/core/client/src/schema-initializer/utils.ts
+++ b/packages/core/client/src/schema-initializer/utils.ts
@@ -42,7 +42,7 @@ export const gridRowColWrap = (schema: ISchema) => {
type: 'void',
'x-component': 'Grid.Col',
properties: {
- [schema.name || uid()]: schema,
+ [schema?.name || uid()]: schema,
},
},
},
@@ -968,13 +968,14 @@ export const useCollectionDataSourceItems = ({
// 目的是使点击无效
onClick() {},
componentProps: {
+ ...dataBlockInitializerProps,
icon: null,
title: otherText || t('Other records'),
name: 'otherRecords',
showAssociationFields: false,
onlyCurrentDataSource: false,
hideChildrenIfSingleCollection: false,
- onCreateBlockSchema: dataBlockInitializerProps.onCreateBlockSchema,
+ fromOthersInPopup: true,
componentType: componentTypeMap[componentName] || componentName,
filter({ collection, associationField }) {
if (filterOtherRecordsCollection) {