fix: failed to open child collections add new modal (#1780)
This commit is contained in:
parent
eb0089190e
commit
03f845246e
@ -49,6 +49,7 @@ import { useBlockTemplateContext } from '../schema-templates/BlockTemplate';
|
|||||||
import { FormDataTemplates } from './DataTemplates';
|
import { FormDataTemplates } from './DataTemplates';
|
||||||
import { FormLinkageRules } from './LinkageRules';
|
import { FormLinkageRules } from './LinkageRules';
|
||||||
import { useLinkageCollectionFieldOptions } from './LinkageRules/action-hooks';
|
import { useLinkageCollectionFieldOptions } from './LinkageRules/action-hooks';
|
||||||
|
import { EnableChildCollections } from './EnableChildCollections';
|
||||||
|
|
||||||
interface SchemaSettingsProps {
|
interface SchemaSettingsProps {
|
||||||
title?: any;
|
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 { collectionName } = props;
|
||||||
const fieldSchema = useFieldSchema();
|
const fieldSchema = useFieldSchema();
|
||||||
const { dn } = useDesignable();
|
const { dn } = useDesignable();
|
||||||
@ -1099,7 +1100,6 @@ SchemaSettings.EnableChildCollections = function EnableChildCollections(props) {
|
|||||||
} as ISchema
|
} as ISchema
|
||||||
}
|
}
|
||||||
onSubmit={(v) => {
|
onSubmit={(v) => {
|
||||||
console.log(v);
|
|
||||||
const enableChildren = [];
|
const enableChildren = [];
|
||||||
for (const item of v.enableChildren.childrenCollections) {
|
for (const item of v.enableChildren.childrenCollections) {
|
||||||
enableChildren.push(_.pickBy(item, _.identity));
|
enableChildren.push(_.pickBy(item, _.identity));
|
||||||
|
Loading…
Reference in New Issue
Block a user