mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:16:03 +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 />,
|
||||
children: (
|
||||
<PaneRoot key={key} {...(PaneRoot !== React.Fragment ? { active: key === contextProps.activeKey } : {})}>
|
||||
<SchemaComponent schema={schema} distributed />
|
||||
<SchemaComponent name={key} schema={schema} onlyRenderProperties distributed />
|
||||
</PaneRoot>
|
||||
),
|
||||
};
|
||||
|
@ -3,7 +3,7 @@ import { useComponent, useDesignable } from '.';
|
||||
import { useMemo } from 'react';
|
||||
import { SchemaToolbar } from '../../schema-settings';
|
||||
|
||||
const Def = () => null;
|
||||
const DefaultSchemaToolbar = () => null;
|
||||
|
||||
export const useDesigner = () => {
|
||||
const { designable } = useDesignable();
|
||||
@ -16,9 +16,9 @@ export const useDesigner = () => {
|
||||
if (fieldSchema['x-settings']) {
|
||||
return SchemaToolbar;
|
||||
}
|
||||
return Def;
|
||||
return DefaultSchemaToolbar;
|
||||
}, [fieldSchema]);
|
||||
|
||||
const component = useComponent(toolbar);
|
||||
return designable ? component || Def : Def;
|
||||
return designable ? component || DefaultSchemaToolbar : DefaultSchemaToolbar;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user