fix: Fix 'enabled' when edit project

fix 'enabled' when edit project

Change-Id: I05712cf5dd3d071b99d632aacff551c2702ad5b7
This commit is contained in:
zhuyue
2021-09-01 18:17:38 +08:00
parent e4de1c12b3
commit c79ae9b9f1

View File

@@ -40,14 +40,11 @@ class EditForm extends ModalAction {
get defaultValue() {
const { name, description, enabled } = this.item;
if (name && this.formRef.current) {
this.formRef.current.setFieldsValue({
name,
description,
enabled: statusTypes.filter((it) => it.value === enabled),
});
}
return {};
return {
name,
description,
enabled,
};
}
checkName = (rule, value) => {
@@ -84,7 +81,6 @@ class EditForm extends ModalAction {
label: t('Status'),
type: 'radio',
optionType: 'default',
isWrappedValue: true,
options: statusTypes,
disabled: true,
help: t(