diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts index 9780f2ed48..df3d4d428e 100644 --- a/packages/core/client/src/schema-initializer/utils.ts +++ b/packages/core/client/src/schema-initializer/utils.ts @@ -563,10 +563,10 @@ export const useFilterInheritsFormItemInitializerFields = (options?) => { const { getInterface, getInheritCollections, getCollection, getParentCollectionFields } = useCollectionManager(); const inherits = getInheritCollections(name); const { snapshot } = useActionContext(); + const form = useForm(); return inherits?.map((v) => { const fields = getParentCollectionFields(v, name); - const form = useForm(); const { readPretty = form.readPretty, block = 'Form' } = options || {}; const targetCollection = getCollection(v); return { @@ -710,10 +710,13 @@ const findSchema = (schema: Schema, key: string, action: string) => { if (s[key] === action) { return s; } - const c = findSchema(s, key, action); - if (c) { - return c; + if (s['x-component'] !== 'Action.Container') { + const c = findSchema(s, key, action); + if (c) { + return c; + } } + return buf; }); }; @@ -741,7 +744,6 @@ export const useCurrentSchema = (action: string, key: string, find = findSchema, const { remove } = useDesignable(); const schema = find(fieldSchema, key, action); const ctx = useContext(BlockRequestContext); - return { schema, exists: !!schema,