Skip to content

Commit 45ea764

Browse files
authored
UI: Fix template is deselected if other zone is selected (#6415)
1 parent 9dbb736 commit 45ea764

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ui/src/views/compute/DeployVM.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
:selected="tabKey"
147147
:loading="loading.templates"
148148
:preFillContent="dataPreFill"
149+
:key="templateKey"
149150
@handle-search-filter="($event) => fetchAllTemplates($event)"
150151
@update-template-iso="updateFieldValue" />
151152
<div>
@@ -736,6 +737,7 @@ export default {
736737
clusterId: null,
737738
zoneSelected: false,
738739
dynamicscalingenabled: true,
740+
templateKey: 0,
739741
vm: {
740742
name: null,
741743
zoneid: null,
@@ -1285,6 +1287,9 @@ export default {
12851287
}
12861288
},
12871289
methods: {
1290+
updateTemplateKey () {
1291+
this.templateKey += 1
1292+
},
12881293
initForm () {
12891294
this.formRef = ref()
12901295
this.form = reactive({})
@@ -1463,7 +1468,6 @@ export default {
14631468
}
14641469
})
14651470
}
1466-
14671471
this.fetchBootTypes()
14681472
this.fetchBootModes()
14691473
this.fetchInstaceGroups()
@@ -2117,6 +2121,7 @@ export default {
21172121
} else {
21182122
this.fetchAllIsos()
21192123
}
2124+
this.updateTemplateKey()
21202125
this.formModel = toRaw(this.form)
21212126
},
21222127
onSelectPodId (value) {

0 commit comments

Comments
 (0)