UI: Fix template is deselected if other zone is selected (#6415)

This commit is contained in:
Nicolas Vazquez 2022-05-31 09:45:09 -03:00 committed by GitHub
parent 9dbb736488
commit 45ea764374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,6 +146,7 @@
:selected="tabKey" :selected="tabKey"
:loading="loading.templates" :loading="loading.templates"
:preFillContent="dataPreFill" :preFillContent="dataPreFill"
:key="templateKey"
@handle-search-filter="($event) => fetchAllTemplates($event)" @handle-search-filter="($event) => fetchAllTemplates($event)"
@update-template-iso="updateFieldValue" /> @update-template-iso="updateFieldValue" />
<div> <div>
@ -736,6 +737,7 @@ export default {
clusterId: null, clusterId: null,
zoneSelected: false, zoneSelected: false,
dynamicscalingenabled: true, dynamicscalingenabled: true,
templateKey: 0,
vm: { vm: {
name: null, name: null,
zoneid: null, zoneid: null,
@ -1285,6 +1287,9 @@ export default {
} }
}, },
methods: { methods: {
updateTemplateKey () {
this.templateKey += 1
},
initForm () { initForm () {
this.formRef = ref() this.formRef = ref()
this.form = reactive({}) this.form = reactive({})
@ -1463,7 +1468,6 @@ export default {
} }
}) })
} }
this.fetchBootTypes() this.fetchBootTypes()
this.fetchBootModes() this.fetchBootModes()
this.fetchInstaceGroups() this.fetchInstaceGroups()
@ -2117,6 +2121,7 @@ export default {
} else { } else {
this.fetchAllIsos() this.fetchAllIsos()
} }
this.updateTemplateKey()
this.formModel = toRaw(this.form) this.formModel = toRaw(this.form)
}, },
onSelectPodId (value) { onSelectPodId (value) {