From b3fac2de9f84ce19f95949989e3c02b7679b1bfe Mon Sep 17 00:00:00 2001 From: nvazquez Date: Sun, 29 May 2022 01:08:42 -0300 Subject: [PATCH] UI: Fix template is deselected if other zone is selected --- ui/src/views/compute/DeployVM.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue index 796dc1167467..2fe7c5599afa 100644 --- a/ui/src/views/compute/DeployVM.vue +++ b/ui/src/views/compute/DeployVM.vue @@ -146,6 +146,7 @@ :selected="tabKey" :loading="loading.templates" :preFillContent="dataPreFill" + :key="templateKey" @handle-search-filter="($event) => fetchAllTemplates($event)" @update-template-iso="updateFieldValue" />
@@ -736,6 +737,7 @@ export default { clusterId: null, zoneSelected: false, dynamicscalingenabled: true, + templateKey: 0, vm: { name: null, zoneid: null, @@ -1285,6 +1287,9 @@ export default { } }, methods: { + updateTemplateKey () { + this.templateKey += 1 + }, initForm () { this.formRef = ref() this.form = reactive({}) @@ -1463,7 +1468,6 @@ export default { } }) } - this.fetchBootTypes() this.fetchBootModes() this.fetchInstaceGroups() @@ -2117,6 +2121,7 @@ export default { } else { this.fetchAllIsos() } + this.updateTemplateKey() this.formModel = toRaw(this.form) }, onSelectPodId (value) {