|
|
@@ -77,11 +77,7 @@ const Complex = (props, ref) => {
|
|
|
formuRef.current.backEndInput(data.formula);
|
|
|
setData(data);
|
|
|
} else {
|
|
|
- form.setFieldsValue({
|
|
|
- name: "",
|
|
|
- alarm_level: "",
|
|
|
- group_id: "",
|
|
|
- });
|
|
|
+ form.resetFields();
|
|
|
setData(null);
|
|
|
}
|
|
|
}
|
|
|
@@ -228,7 +224,7 @@ const Complex = (props, ref) => {
|
|
|
useEffect(() => {
|
|
|
if (type === 2) {
|
|
|
setAlarmId(-1);
|
|
|
- } else if(alarmId === -1 && type !== 2) {
|
|
|
+ } else if (alarmId === -1 && type !== 2) {
|
|
|
setAlarmId(null);
|
|
|
}
|
|
|
}, [type, alarmId]);
|