mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 04:27:04 +00:00
fix: linkage rules in subtable/subform affecting blocks in association field popups
This commit is contained in:
parent
ee9b2d6f41
commit
9417ccc295
@ -20,7 +20,7 @@ import { useActionContext } from './hooks';
|
||||
import { useSetAriaLabelForDrawer } from './hooks/useSetAriaLabelForDrawer';
|
||||
import { ActionDrawerProps, ComposedActionDrawer, OpenSize } from './types';
|
||||
import { useZIndexContext, zIndexContext } from './zIndexContext';
|
||||
|
||||
import { FlagProvider } from '../../../flag-provider';
|
||||
const DrawerErrorFallback: React.FC<FallbackProps> = (props) => {
|
||||
const { visible, setVisible } = useActionContext();
|
||||
return (
|
||||
@ -112,7 +112,9 @@ export const InternalActionDrawer: React.FC<ActionDrawerProps> = observer(
|
||||
|
||||
export const ActionDrawer: ComposedActionDrawer = (props) => (
|
||||
<ErrorBoundary FallbackComponent={DrawerErrorFallback} onError={(err) => console.log(err)}>
|
||||
<InternalActionDrawer {...props} />
|
||||
<FlagProvider isInSubTable={false} isInSubForm={false}>
|
||||
<InternalActionDrawer {...props} />
|
||||
</FlagProvider>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
|
||||
|
@ -21,6 +21,7 @@ import { useActionContext } from './hooks';
|
||||
import { useSetAriaLabelForModal } from './hooks/useSetAriaLabelForModal';
|
||||
import { ActionDrawerProps, ComposedActionDrawer, OpenSize } from './types';
|
||||
import { useZIndexContext, zIndexContext } from './zIndexContext';
|
||||
import { FlagProvider } from '../../../flag-provider';
|
||||
|
||||
const ModalErrorFallback: React.FC<FallbackProps> = (props) => {
|
||||
const { visible, setVisible } = useActionContext();
|
||||
@ -155,7 +156,9 @@ export const InternalActionModal: React.FC<ActionDrawerProps<ModalProps>> = obse
|
||||
|
||||
export const ActionModal: ComposedActionDrawer<ModalProps> = (props) => (
|
||||
<ErrorBoundary FallbackComponent={ModalErrorFallback} onError={(err) => console.log(err)}>
|
||||
<InternalActionModal {...props} />
|
||||
<FlagProvider isInSubTable={false} isInSubForm={false}>
|
||||
<InternalActionModal {...props} />
|
||||
</FlagProvider>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
|
||||
|
@ -16,6 +16,7 @@ import { TabsContextProvider, useTabsContext } from '../tabs/context';
|
||||
import { useActionPageStyle } from './Action.Page.style';
|
||||
import { usePopupOrSubpagesContainerDOM } from './hooks/usePopupSlotDOM';
|
||||
import { useZIndexContext, zIndexContext } from './zIndexContext';
|
||||
import { FlagProvider } from '../../../flag-provider';
|
||||
|
||||
export function ActionPage({ level }) {
|
||||
const filedSchema = useFieldSchema();
|
||||
@ -36,13 +37,15 @@ export function ActionPage({ level }) {
|
||||
}
|
||||
|
||||
const actionPageNode = (
|
||||
<div className={styles.container} style={style}>
|
||||
<TabsContextProvider {...tabContext} tabBarExtraContent={<BackButtonUsedInSubPage />}>
|
||||
<zIndexContext.Provider value={style.zIndex}>
|
||||
<RecursionField schema={filedSchema} onlyRenderProperties />
|
||||
</zIndexContext.Provider>
|
||||
</TabsContextProvider>
|
||||
</div>
|
||||
<FlagProvider isInSubTable={false} isInSubForm={false}>
|
||||
<div className={styles.container} style={style}>
|
||||
<TabsContextProvider {...tabContext} tabBarExtraContent={<BackButtonUsedInSubPage />}>
|
||||
<zIndexContext.Provider value={style.zIndex}>
|
||||
<RecursionField schema={filedSchema} onlyRenderProperties />
|
||||
</zIndexContext.Provider>
|
||||
</TabsContextProvider>
|
||||
</div>
|
||||
</FlagProvider>
|
||||
);
|
||||
|
||||
const container = getContainerDOM();
|
||||
|
Loading…
Reference in New Issue
Block a user