diff --git a/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/VUART.vue b/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/VUART.vue index a704af79c..6f8e7690c 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/VUART.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config/ConfigForm/CustomWidget/VUART.vue @@ -19,7 +19,7 @@ + @input="selectChange(index,VUARTConn.endpoint[0].vm_name,VUARTConn.endpoint[0],0)"> must have value @@ -47,7 +47,7 @@ + @input="selectChange(index,VUARTConn.endpoint[1].vm_name,VUARTConn.endpoint[1],1)"> must have value @@ -193,7 +193,7 @@ export default { let epTypeProp = this.rootSchema.definitions.VuartEndpointType.properties let conTypeProp = this.rootSchema.definitions.VuartConnectionType.properties return { - selected: {0: {oldValue: ""}, 1: {oldValue: ""}}, + selected: {0: {0: {oldValue: ""}, 1: {oldValue: ""}}}, VuartEndpointType: this.rootSchema.definitions['VuartEndpointType']['properties'], vmNameTitle: epTypeProp.vm_name.title, vuartConnectionTypeTitle: conTypeProp.type.title, @@ -259,12 +259,18 @@ export default { ] }) }, - selectChange(value, obj, endpoint) { - if (this.selected[endpoint].oldValue != value) { + selectChange(index, value, obj, endpoint) { + if (this.selected[index]) { + if (this.selected[index][endpoint].oldValue != value) { + obj.vbdf = "" + obj.io_port = "" + } + } else { + this.selected[index] = {0: {oldValue: ""}, 1: {oldValue: ""}} obj.vbdf = "" obj.io_port = "" } - this.selected[endpoint].oldValue = value + this.selected[index][endpoint]["oldValue"] = value }, } };