diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalNester.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalNester.tsx index 1f33411bd9..449b18b4ba 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalNester.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalNester.tsx @@ -3,16 +3,15 @@ import { RecursionField, useField, useFieldSchema } from '@formily/react'; import React, { useEffect } from 'react'; import { CollectionProvider } from '../../../collection-manager'; import { useInsertSchema } from './hooks'; -import { useCollection, useCollectionManager } from '../../../'; +import { useCollectionManager } from '../../../'; import schema from './schema'; export const InternalNester = () => { const field = useField(); const fieldSchema = useFieldSchema(); const insertNester = useInsertSchema('Nester'); - const { getField } = useCollection(); const { getCollectionJoinField } = useCollectionManager(); - const collectionField = getField(fieldSchema['name']) || getCollectionJoinField(fieldSchema['x-collection-field']); + const collectionField = getCollectionJoinField(fieldSchema['x-collection-field']); useEffect(() => { insertNester(schema.Nester); }, []);