Skip to content

Commit

Permalink
Fix race in settings UI and settings API fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Aug 14, 2021
1 parent cce5cff commit d41b697
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontend/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<hr />

<section class="wrap-small">
<form @submit.prevent="onSubmit">
<form @submit.prevent="onSubmit" v-if="!isLoading">
<b-tabs type="is-boxed" :animated="false">
<b-tab-item :label="$t('settings.general.name')" label-position="on-border">
<div class="items">
Expand Down Expand Up @@ -503,7 +503,8 @@

<!-- bounce mailbox -->
<b-field :label="$t('settings.bounces.enableMailbox')">
<b-switch v-model="form['bounce.mailboxes'][0].enabled"
<b-switch v-if="form['bounce.mailboxes']"
v-model="form['bounce.mailboxes'][0].enabled"
:disabled="!form['bounce.enabled']"
name="enabled" :native-value="true" data-cy="btn-enable-bounce-mailbox" />
</b-field>
Expand Down Expand Up @@ -885,7 +886,10 @@ export default Vue.extend({
this.form = d;
this.formCopy = JSON.stringify(d);
this.isLoading = false;
this.$nextTick(() => {
this.isLoading = false;
});
});
},
},
Expand Down

0 comments on commit d41b697

Please sign in to comment.