Unverified Commit 3550d0d1 authored by Licho's avatar Licho Committed by GitHub

fix: cluster display nothing when alias is not set (#1262)

Signed-off-by: 's avatarLicho <chinabhsun@gmail.com> Signed-off-by: 's avatarLicho <chinabhsun@gmail.com>
parent ff7618f1
...@@ -59,7 +59,12 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => { ...@@ -59,7 +59,12 @@ const ClusterForm: React.FC<ClusterFormProps> = (props) => {
const submitForm = async () => { const submitForm = async () => {
const fieldsValue = await form.validateFields(); const fieldsValue = await form.validateFields();
fieldsValue.id = formVals.id; fieldsValue.id = formVals.id;
if (!fieldsValue.alias || fieldsValue.alias.length == 0) {
fieldsValue.alias = fieldsValue.name;
}
setFormVals(fieldsValue); setFormVals(fieldsValue);
handleSubmit(fieldsValue); handleSubmit(fieldsValue);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment