diff --git a/packages/core/client/src/schema-component/antd/menu/Menu.Designer.tsx b/packages/core/client/src/schema-component/antd/menu/Menu.Designer.tsx index c7f45ca4a3..02bc320bae 100644 --- a/packages/core/client/src/schema-component/antd/menu/Menu.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/menu/Menu.Designer.tsx @@ -272,7 +272,7 @@ export const MenuDesigner = () => { title: field.title, icon: field.componentProps.icon, }; - }, [field]); + }, [field.title, field.componentProps.icon]); if (fieldSchema['x-component'] === 'Menu.URL') { schema.properties['href'] = urlSchema; schema.properties['params'] = paramsSchema; @@ -364,7 +364,6 @@ export const MenuDesigner = () => { title: t('Delete menu item'), }; }, [t]); - return ( @@ -530,14 +529,14 @@ Menu.Item = observer( removeParentsIfNoChildren={false} > - {t(field.title)} + {t(schema.title)} ), }; - }, [field.title, icon, schema, Designer]); + }, [schema.title, icon, schema, Designer]); if (!pushMenuItem) { error('Menu.Item must be wrapped by GetMenuItemsContext.Provider'); diff --git a/packages/plugins/@nocobase/plugin-action-custom-request/src/client/initializer/CustomRequestInitializer.tsx b/packages/plugins/@nocobase/plugin-action-custom-request/src/client/initializer/CustomRequestInitializer.tsx index ed0b64ce37..2e47ed08df 100644 --- a/packages/plugins/@nocobase/plugin-action-custom-request/src/client/initializer/CustomRequestInitializer.tsx +++ b/packages/plugins/@nocobase/plugin-action-custom-request/src/client/initializer/CustomRequestInitializer.tsx @@ -35,12 +35,12 @@ export const CustomRequestInitializer: React.FC = (props) => { const customRequestsResource = useCustomRequestsResource(); const itemConfig = useSchemaInitializerItem(); const { insert } = useSchemaInitializer(); + const schema = getNewSchema(); return ( { - const schema = getNewSchema(); const s = merge(schema || {}, itemConfig.schema || {}); itemConfig?.schemaInitialize?.(s); insert(s);