collectionsLoading
This commit is contained in:
parent
70652c9bf7
commit
ab81afecfa
@ -31,6 +31,7 @@ import {
|
|||||||
PageTitleProvider,
|
PageTitleProvider,
|
||||||
usePageTitleContext,
|
usePageTitleContext,
|
||||||
CollectionsProvider,
|
CollectionsProvider,
|
||||||
|
useCollectionsContext,
|
||||||
} from '../../constate';
|
} from '../../constate';
|
||||||
|
|
||||||
function DesignableToggle() {
|
function DesignableToggle() {
|
||||||
@ -106,6 +107,7 @@ function LayoutWithMenu(props: LayoutWithMenuProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Content({ activeKey }) {
|
function Content({ activeKey }) {
|
||||||
|
const { loading: collectionsLoading } = useCollectionsContext();
|
||||||
const { data = {}, loading } = useRequest(
|
const { data = {}, loading } = useRequest(
|
||||||
`ui_schemas:getTree?filter[parentKey]=${activeKey}`,
|
`ui_schemas:getTree?filter[parentKey]=${activeKey}`,
|
||||||
{
|
{
|
||||||
@ -114,7 +116,7 @@ function Content({ activeKey }) {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (loading) {
|
if (loading || collectionsLoading) {
|
||||||
return <Spin />;
|
return <Spin />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user