Merge "fix: Fix 'enabled' when edit project"

This commit is contained in:
Zuul 2021-09-02 02:01:58 +00:00 committed by Gerrit Code Review
commit 323396b545

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({
return {
name,
description,
enabled: statusTypes.filter((it) => it.value === enabled),
});
}
return {};
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(