Config UI: only reset form-data on manual template change (#12815)
This commit is contained in:
parent
b5758f6a0f
commit
b88c310142
2 changed files with 8 additions and 3 deletions
|
|
@ -41,6 +41,7 @@
|
|||
<select
|
||||
id="meterTemplate"
|
||||
v-model="templateName"
|
||||
@change="templateChanged"
|
||||
:disabled="!isNew"
|
||||
class="form-select w-100"
|
||||
>
|
||||
|
|
@ -62,7 +63,6 @@
|
|||
{{ option.name }}
|
||||
</option>
|
||||
</select>
|
||||
{{ templateName }}
|
||||
</FormRow>
|
||||
<p v-if="loadingTemplate">Loading ...</p>
|
||||
<Modbus
|
||||
|
|
@ -314,7 +314,6 @@ export default {
|
|||
},
|
||||
async loadTemplate() {
|
||||
this.template = null;
|
||||
this.reset();
|
||||
this.loadingTemplate = true;
|
||||
try {
|
||||
const opts = {
|
||||
|
|
@ -405,6 +404,9 @@ export default {
|
|||
selectType(type) {
|
||||
this.selectedType = type;
|
||||
},
|
||||
templateChanged() {
|
||||
this.reset();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
<select
|
||||
id="vehicleTemplate"
|
||||
v-model="templateName"
|
||||
@change="templateChanged"
|
||||
:disabled="!isNew"
|
||||
class="form-select w-100"
|
||||
>
|
||||
|
|
@ -259,7 +260,6 @@ export default {
|
|||
},
|
||||
async loadTemplate() {
|
||||
this.template = null;
|
||||
this.reset();
|
||||
try {
|
||||
const opts = {
|
||||
params: {
|
||||
|
|
@ -341,6 +341,9 @@ export default {
|
|||
modalInvisible() {
|
||||
this.isModalVisible = false;
|
||||
},
|
||||
templateChanged() {
|
||||
this.reset();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue