diff --git a/packages/client/src/route-switch/antd/admin-layout/index.tsx b/packages/client/src/route-switch/antd/admin-layout/index.tsx index f5372ab87..3471e3fee 100644 --- a/packages/client/src/route-switch/antd/admin-layout/index.tsx +++ b/packages/client/src/route-switch/antd/admin-layout/index.tsx @@ -74,8 +74,10 @@ const InternalAdminLayout = (props: any) => {
@@ -96,20 +98,20 @@ const InternalAdminLayout = (props: any) => { } data['x-component-props'] = data['x-component-props'] || {}; data['x-component-props']['defaultSelectedUid'] = defaultSelectedUid; - filterByACL(data, ctx); - return data; + return filterByACL(data, ctx); }} onSuccess={(data) => { + const schema = filterByACL(data?.data, ctx); if (defaultSelectedUid) { - const s = findByUid(data?.data, defaultSelectedUid); + const s = findByUid(schema, defaultSelectedUid); if (s) { setTitle(s.title); + return; } - return; } setHidden(true); setTimeout(() => setHidden(false), 11); - const s = findMenuItem(data?.data); + const s = findMenuItem(schema); if (s) { setSchema(s); setTitle(s.title);