mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:57:19 +00:00
fix: workflow tabs not exists (#3889)
This commit is contained in:
parent
25c902b2a7
commit
28ca702ab9
@ -25,7 +25,7 @@ export const Tabs: any = observer(
|
|||||||
label: <RecursionField name={key} schema={schema} onlyRenderSelf />,
|
label: <RecursionField name={key} schema={schema} onlyRenderSelf />,
|
||||||
children: (
|
children: (
|
||||||
<PaneRoot key={key} {...(PaneRoot !== React.Fragment ? { active: key === contextProps.activeKey } : {})}>
|
<PaneRoot key={key} {...(PaneRoot !== React.Fragment ? { active: key === contextProps.activeKey } : {})}>
|
||||||
<SchemaComponent schema={schema} distributed />
|
<SchemaComponent name={key} schema={schema} onlyRenderProperties distributed />
|
||||||
</PaneRoot>
|
</PaneRoot>
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@ import { useComponent, useDesignable } from '.';
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { SchemaToolbar } from '../../schema-settings';
|
import { SchemaToolbar } from '../../schema-settings';
|
||||||
|
|
||||||
const Def = () => null;
|
const DefaultSchemaToolbar = () => null;
|
||||||
|
|
||||||
export const useDesigner = () => {
|
export const useDesigner = () => {
|
||||||
const { designable } = useDesignable();
|
const { designable } = useDesignable();
|
||||||
@ -16,9 +16,9 @@ export const useDesigner = () => {
|
|||||||
if (fieldSchema['x-settings']) {
|
if (fieldSchema['x-settings']) {
|
||||||
return SchemaToolbar;
|
return SchemaToolbar;
|
||||||
}
|
}
|
||||||
return Def;
|
return DefaultSchemaToolbar;
|
||||||
}, [fieldSchema]);
|
}, [fieldSchema]);
|
||||||
|
|
||||||
const component = useComponent(toolbar);
|
const component = useComponent(toolbar);
|
||||||
return designable ? component || Def : Def;
|
return designable ? component || DefaultSchemaToolbar : DefaultSchemaToolbar;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user