|
|
@@ -102,6 +102,10 @@ const Save = observer(() => {
|
|
|
effects() {
|
|
|
onFieldValueChange('type', (field, f) => {
|
|
|
const value = (field as Field).value;
|
|
|
+ f.deleteValuesIn('configuration');
|
|
|
+ f.deleteValuesIn('cluster');
|
|
|
+ f.clearErrors();
|
|
|
+
|
|
|
const _host = filterConfigByType(_.cloneDeep(configRef.current), value);
|
|
|
f.setFieldState('grid.configuration.panel1.layout2.host', (state) => {
|
|
|
state.dataSource = _host.map((item) => ({ label: item.host, value: item.host }));
|