fix: close modal after editing cluster
This commit is contained in:
@@ -164,7 +164,13 @@ const Credentials: React.FC = () => {
|
||||
});
|
||||
}
|
||||
fetchData();
|
||||
|
||||
setOpenAddModal({
|
||||
open: false,
|
||||
action: PageAction.CREATE,
|
||||
currentData: undefined,
|
||||
title: '',
|
||||
provider: null
|
||||
});
|
||||
message.success(intl.formatMessage({ id: 'common.message.success' }));
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
@@ -423,6 +423,7 @@ const PoolForm: React.FC<AddModalProps> = forwardRef((props, ref) => {
|
||||
>
|
||||
<AutoComplete
|
||||
showSearch
|
||||
allowClear
|
||||
onChange={handleOsImageChange}
|
||||
filterOption={filterImageOption}
|
||||
optionRender={(option) =>
|
||||
|
||||
@@ -100,9 +100,9 @@ const Credentials: React.FC = () => {
|
||||
});
|
||||
} else {
|
||||
await createCredential({ data: params });
|
||||
// if (isFromCluster) {
|
||||
// navigate(-1);
|
||||
// }
|
||||
if (isFromCluster) {
|
||||
navigate(-1);
|
||||
}
|
||||
}
|
||||
fetchData();
|
||||
setOpenModalStatus({ ...openModalStatus, open: false });
|
||||
|
||||
Reference in New Issue
Block a user