UI: Fix hypervisor not selected by default when deploying VM from ISO (#6436)

* UI: Fix hypervisor not selected by default when deploying VM from ISO

* Address comment
This commit is contained in:
Nicolas Vazquez 2022-06-09 07:30:20 -03:00 committed by GitHub
parent d45d257b9a
commit aae0fae950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,6 +180,7 @@
<a-form-item :label="$t('label.hypervisor')"> <a-form-item :label="$t('label.hypervisor')">
<a-select <a-select
v-model:value="form.hypervisor" v-model:value="form.hypervisor"
:preFillContent="dataPreFill"
:options="hypervisorSelectOptions" :options="hypervisorSelectOptions"
@change="value => hypervisor = value" @change="value => hypervisor = value"
showSearch showSearch
@ -1974,7 +1975,9 @@ export default {
this.options[name] = response this.options[name] = response
if (name === 'hypervisors') { if (name === 'hypervisors') {
this.hypervisor = response[0] && response[0].name ? response[0].name : null const hypervisorFromResponse = response[0] && response[0].name ? response[0].name : null
this.dataPreFill.hypervisor = hypervisorFromResponse
this.form.hypervisor = hypervisorFromResponse
} }
if (param.field) { if (param.field) {