fix: missing app context in modal (#4457)

* fix: useCurrentFormVariable

* test: table action row action linkage by row data

* test: detail block support linkage rule

* test: detail block support linkage rule

* test: detail block support linkage rule

* fix: missing app context in modal
This commit is contained in:
Katherine 2024-05-23 09:33:55 +08:00 committed by GitHub
parent b052a8229c
commit 11343bc9be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,6 +93,7 @@ import { EnableChildCollections } from './EnableChildCollections';
import { ChildDynamicComponent } from './EnableChildCollections/DynamicComponent';
import { FormLinkageRules } from './LinkageRules';
import { useLinkageCollectionFieldOptions } from './LinkageRules/action-hooks';
import { ApplicationContext, useApp } from '../application';
export interface SchemaSettingsProps {
title?: any;
@ -725,6 +726,7 @@ export const SchemaSettingsModalItem: FC<SchemaSettingsModalItemProps> = (props)
const options = useContext(SchemaOptionsContext);
const collection = useCollection_deprecated();
const apiClient = useAPIClient();
const app = useApp();
const { theme } = useGlobalTheme();
const ctx = useBlockRequestContext();
const upLevelActiveFields = useFormActiveFields();
@ -793,11 +795,13 @@ export const SchemaSettingsModalItem: FC<SchemaSettingsModalItemProps> = (props)
}
`}
>
<APIClientProvider apiClient={apiClient}>
<ConfigProvider locale={locale}>
<SchemaComponent components={components} scope={scope} schema={schema} />
</ConfigProvider>
</APIClientProvider>
<ApplicationContext.Provider value={app}>
<APIClientProvider apiClient={apiClient}>
<ConfigProvider locale={locale}>
<SchemaComponent components={components} scope={scope} schema={schema} />
</ConfigProvider>
</APIClientProvider>
</ApplicationContext.Provider>
</FormLayout>
</SchemaComponentOptions>
</AssociationOrCollectionProvider>