mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 19:05:51 +00:00
refresh schema
This commit is contained in:
parent
ab81afecfa
commit
57cc9e6081
@ -107,16 +107,17 @@ function LayoutWithMenu(props: LayoutWithMenuProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Content({ activeKey }) {
|
function Content({ activeKey }) {
|
||||||
const { loading: collectionsLoading } = useCollectionsContext();
|
const { designable } = useDesignableSwitchContext();
|
||||||
const { data = {}, loading } = useRequest(
|
const { collections } = useCollectionsContext();
|
||||||
|
const { data = {}, loading, run } = useRequest(
|
||||||
`ui_schemas:getTree?filter[parentKey]=${activeKey}`,
|
`ui_schemas:getTree?filter[parentKey]=${activeKey}`,
|
||||||
{
|
{
|
||||||
refreshDeps: [activeKey],
|
refreshDeps: [activeKey, collections, designable],
|
||||||
formatResult: (result) => result?.data,
|
formatResult: (result) => result?.data,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (loading || collectionsLoading) {
|
if (loading) {
|
||||||
return <Spin />;
|
return <Spin />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ AddNew.CardItem = observer((props: any) => {
|
|||||||
key={view.key}
|
key={view.key}
|
||||||
title={view.title}
|
title={view.title}
|
||||||
>
|
>
|
||||||
<Menu.ItemGroup key={`${view.key}-select`} title={'所属数据表'}>
|
<Menu.ItemGroup className={'display-fields'} key={`${view.key}-select`} title={'所属数据表'}>
|
||||||
{collections?.map((item) => (
|
{collections?.map((item) => (
|
||||||
<Menu.Item
|
<Menu.Item
|
||||||
style={{ minWidth: 150 }}
|
style={{ minWidth: 150 }}
|
||||||
|
Loading…
Reference in New Issue
Block a user