fix: failed to open child collections add new modal (#1780)

This commit is contained in:
katherinehhh 2023-04-30 11:21:24 +08:00 committed by GitHub
parent eb0089190e
commit 03f845246e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,7 @@ import { useBlockTemplateContext } from '../schema-templates/BlockTemplate';
import { FormDataTemplates } from './DataTemplates';
import { FormLinkageRules } from './LinkageRules';
import { useLinkageCollectionFieldOptions } from './LinkageRules/action-hooks';
import { EnableChildCollections } from './EnableChildCollections';
interface SchemaSettingsProps {
title?: any;
@ -1061,7 +1062,7 @@ SchemaSettings.DataTemplates = function DataTemplates(props) {
);
};
SchemaSettings.EnableChildCollections = function EnableChildCollections(props) {
SchemaSettings.EnableChildCollections = function EnableChildCollectionsItem(props) {
const { collectionName } = props;
const fieldSchema = useFieldSchema();
const { dn } = useDesignable();
@ -1099,7 +1100,6 @@ SchemaSettings.EnableChildCollections = function EnableChildCollections(props) {
} as ISchema
}
onSubmit={(v) => {
console.log(v);
const enableChildren = [];
for (const item of v.enableChildren.childrenCollections) {
enableChildren.push(_.pickBy(item, _.identity));