ui: fix set reservation toggle in add public ip range (#6707)

Fixes 'Set reservation' toggle not getting updated on value change.
This commit is contained in:
Abhishek Kumar 2022-09-06 14:05:01 +05:30 committed by GitHub
parent e76df16d9f
commit 1d20fcfc6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -239,7 +239,7 @@
</div>
<div class="form__item" v-if="!basicGuestNetwork && form.iptype != 'ip6'">
<div style="color: black;">{{ $t('label.set.reservation') }}</div>
<a-switch @change="handleShowAccountFields" />
<a-switch v-model:checked="showAccountFields" @change="handleShowAccountFields" />
</div>
<div v-if="showAccountFields && !basicGuestNetwork" style="margin-top: 20px;">
<div v-html="$t('label.set.reservation.desc')"></div>
@ -555,12 +555,9 @@ export default {
this.fetchDomains()
},
handleShowAccountFields () {
if (this.showAccountFields === false) {
this.showAccountFields = true
if (this.showAccountFields) {
this.fetchDomains()
return
}
this.showAccountFields = false
},
handleOpenAddIpRangeModal () {
this.initAddIpRangeForm()