diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalSubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalSubTable.tsx index b11f8aea55..7775f27b57 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalSubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalSubTable.tsx @@ -1,9 +1,9 @@ import { css } from '@emotion/css'; import { FormItem, FormLayout } from '@formily/antd-v5'; -import { RecursionField, observer, useField, useFieldSchema } from '@formily/react'; +import { RecursionField, observer, useField, useFieldSchema, SchemaOptionsContext } from '@formily/react'; import React, { useEffect } from 'react'; import { CollectionProvider } from '../../../collection-manager'; -import { SchemaComponentOptions } from '../../../schema-component'; +import { useSchemaOptionsContext } from '../../../schema-component'; import Select from '../select/Select'; import { useAssociationFieldContext, useInsertSchema } from './hooks'; import schema from './schema'; @@ -18,6 +18,14 @@ export const InternalSubTable = observer( insert(schema.SubTable); field.required = fieldSchema['required']; }, []); + + const option = useSchemaOptionsContext(); + const components = { + ...option.components, + FormItem: (props) => , + 'Radio.Group': Select, + 'Checkbox.Group': (props) => , + - + );