From 7f70cb15d035f0c233b9e62b9e43aa985317c908 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 04 十一月 2024 10:22:45 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/menu/MenuEdit.jsx |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/zy-acs-flow/src/page/menu/MenuEdit.jsx b/zy-acs-flow/src/page/menu/MenuEdit.jsx
index bd1358e..213ee2a 100644
--- a/zy-acs-flow/src/page/menu/MenuEdit.jsx
+++ b/zy-acs-flow/src/page/menu/MenuEdit.jsx
@@ -17,6 +17,7 @@
     Form,
     useUpdate,
     useCreate,
+    useCreateContext,
 } from 'react-admin';
 import {
     Dialog,
@@ -33,6 +34,7 @@
 import TreeSelectInput from "../components/TreeSelectInput";
 
 const EditContent = ({ editRecord }) => {
+    const { resource } = useCreateContext();
     return (
         <Grid container rowSpacing={2} columnSpacing={2}>
             <Grid item xs={6} display="flex" gap={1}>
@@ -40,7 +42,7 @@
                     label="table.field.menu.parentName"
                     value={editRecord?.parentId}
                     isTranslate
-                    autoFocus
+                    resource={resource}
                 />
             </Grid>
             <Grid item xs={6} display="flex" gap={1}>

--
Gitblit v1.9.1