diff --git a/src/components/CreatePollDialog.vue b/src/components/CreatePollDialog.vue index 14fc973..c5ff2aa 100644 --- a/src/components/CreatePollDialog.vue +++ b/src/components/CreatePollDialog.vue @@ -44,7 +44,7 @@ :class="{ deletable: pollAnswers.length > 1 }" ref="answerInput" > - delete + delete @@ -72,7 +72,7 @@ block class="filled-button publish-button" @click.stop="onCreatePoll()" - :disabled="isCreating" + :disabled="isCreating || !publishButtonEnabled" >{{ $t("poll_create.create") }} @@ -197,6 +197,11 @@ export default { } }, }, + computed: { + publishButtonEnabled() { + return this.pollQuestion && this.pollAnswers.length > 0 && this.pollAnswers.every(a => a.text); + } + }, components: { InputControl }, };