fix: close modal after editing cluster

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent d9d5ca95df
commit 5e1a26b743
3 changed files with 11 additions and 4 deletions
+7 -1
View File
@@ -164,7 +164,13 @@ const Credentials: React.FC = () => {
}); });
} }
fetchData(); fetchData();
setOpenAddModal({
open: false,
action: PageAction.CREATE,
currentData: undefined,
title: '',
provider: null
});
message.success(intl.formatMessage({ id: 'common.message.success' })); message.success(intl.formatMessage({ id: 'common.message.success' }));
} catch (error) {} } catch (error) {}
}; };
@@ -423,6 +423,7 @@ const PoolForm: React.FC<AddModalProps> = forwardRef((props, ref) => {
> >
<AutoComplete <AutoComplete
showSearch showSearch
allowClear
onChange={handleOsImageChange} onChange={handleOsImageChange}
filterOption={filterImageOption} filterOption={filterImageOption}
optionRender={(option) => optionRender={(option) =>
+3 -3
View File
@@ -100,9 +100,9 @@ const Credentials: React.FC = () => {
}); });
} else { } else {
await createCredential({ data: params }); await createCredential({ data: params });
// if (isFromCluster) { if (isFromCluster) {
// navigate(-1); navigate(-1);
// } }
} }
fetchData(); fetchData();
setOpenModalStatus({ ...openModalStatus, open: false }); setOpenModalStatus({ ...openModalStatus, open: false });