diff --git a/packages/client/src/components/admin-layout/index.tsx b/packages/client/src/components/admin-layout/index.tsx
index e6b1b934e..9b5294532 100644
--- a/packages/client/src/components/admin-layout/index.tsx
+++ b/packages/client/src/components/admin-layout/index.tsx
@@ -107,16 +107,17 @@ function LayoutWithMenu(props: LayoutWithMenuProps) {
}
function Content({ activeKey }) {
- const { loading: collectionsLoading } = useCollectionsContext();
- const { data = {}, loading } = useRequest(
+ const { designable } = useDesignableSwitchContext();
+ const { collections } = useCollectionsContext();
+ const { data = {}, loading, run } = useRequest(
`ui_schemas:getTree?filter[parentKey]=${activeKey}`,
{
- refreshDeps: [activeKey],
+ refreshDeps: [activeKey, collections, designable],
formatResult: (result) => result?.data,
},
);
- if (loading || collectionsLoading) {
+ if (loading) {
return