Skip to content

Commit 1d20fcf

Browse files
authored
ui: fix set reservation toggle in add public ip range (#6707)
Fixes 'Set reservation' toggle not getting updated on value change.
1 parent e76df16 commit 1d20fcf

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ui/src/views/infra/network/IpRangesTabPublic.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
</div>
240240
<div class="form__item" v-if="!basicGuestNetwork && form.iptype != 'ip6'">
241241
<div style="color: black;">{{ $t('label.set.reservation') }}</div>
242-
<a-switch @change="handleShowAccountFields" />
242+
<a-switch v-model:checked="showAccountFields" @change="handleShowAccountFields" />
243243
</div>
244244
<div v-if="showAccountFields && !basicGuestNetwork" style="margin-top: 20px;">
245245
<div v-html="$t('label.set.reservation.desc')"></div>
@@ -555,12 +555,9 @@ export default {
555555
this.fetchDomains()
556556
},
557557
handleShowAccountFields () {
558-
if (this.showAccountFields === false) {
559-
this.showAccountFields = true
558+
if (this.showAccountFields) {
560559
this.fetchDomains()
561-
return
562560
}
563-
this.showAccountFields = false
564561
},
565562
handleOpenAddIpRangeModal () {
566563
this.initAddIpRangeForm()

0 commit comments

Comments
 (0)