diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalDrawerSubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalDrawerSubTable.tsx index 0d94e222f..beff25661 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalDrawerSubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalDrawerSubTable.tsx @@ -1,21 +1,21 @@ import { EditOutlined } from '@ant-design/icons'; import { css } from '@emotion/css'; -import { observer } from '@tachybase/schema'; -import React, { useContext, useRef, useState } from 'react'; +import { observer, useField, useFieldSchema } from '@tachybase/schema'; +import React, { useContext, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { InternalSubTable } from './InternalSubTable'; import { Button, Drawer } from 'antd'; -import { useAssociationFieldContext } from './hooks'; +import { SubFormProvider, useAssociationFieldContext } from './hooks'; import { ActionContext, ActionContextProvider } from '../action/context'; -import { useGetAriaLabelOfPopover } from '../action'; import { ReadPrettyInternalViewer } from './InternalViewer'; +import { useCollectionManager } from '../../../data-source'; +import { FlagProvider } from '../../../flag-provider'; export const InternaDrawerSubTable = observer( (props) => { const { options } = useAssociationFieldContext(); const [visible, setVisible] = useState(false); const { t } = useTranslation(); - const ref = useRef(); const nesterProps = { ...props, shouldMountElement: true, @@ -26,8 +26,11 @@ export const InternaDrawerSubTable = observer( enableLink: true, }; + const field = useField(); + const fieldSchema = useFieldSchema(); + const cm = useCollectionManager(); + const ctx = useContext(ActionContext); - const { getAriaLabel } = useGetAriaLabelOfPopover(); return ( <> } > - + + + + +