From e7bf47f81c633e1457da113c984786ecea478e36 Mon Sep 17 00:00:00 2001 From: Zzm0809 <934230207@qq.com> Date: Wed, 17 Apr 2024 10:08:55 +0800 Subject: [PATCH] [Fix] fix resource tree cannot refresh (#3406) Signed-off-by: Zzm0809 <934230207@qq.com> --- .../RegCenter/Resource/components/ResourceOverView/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dinky-web/src/pages/RegCenter/Resource/components/ResourceOverView/index.tsx b/dinky-web/src/pages/RegCenter/Resource/components/ResourceOverView/index.tsx index 89c0c0a1bc..55f0c6ce0f 100644 --- a/dinky-web/src/pages/RegCenter/Resource/components/ResourceOverView/index.tsx +++ b/dinky-web/src/pages/RegCenter/Resource/components/ResourceOverView/index.tsx @@ -233,10 +233,9 @@ const ResourceOverView: React.FC = (props) => { await handleOption(API_CONSTANTS.RESOURCE_CREATE_FOLDER, l('right.menu.createFolder'), { ...value, pid - }); - setResourceState((prevState) => ({ ...prevState, editOpen: false })); + }, ()=> handleModalCancel()); } else if (editModal === 'rename') { - await handleOption(API_CONSTANTS.RESOURCE_RENAME, l('right.menu.rename'), { ...value, pid }); + await handleOption(API_CONSTANTS.RESOURCE_RENAME, l('right.menu.rename'), { ...value, pid },()=> handleModalCancel()); } }; const handleUploadCancel = async () => {