diff options
author | dartcafe <github@dartcafe.de> | 2021-03-06 14:18:19 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-03-06 14:18:19 +0300 |
commit | 7b72fa965a7be4bdd1088b4d9e6ae3a412488a01 (patch) | |
tree | b04b6c03800aff26eb51181c7a43179a33803ff0 /src/js/components/SideBar/SideBarTabConfiguration.vue | |
parent | 6ff9eac06a9ae86830c9b58ebea2436ecea25afe (diff) |
write poll after change, than after input in description and title
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/SideBar/SideBarTabConfiguration.vue')
-rw-r--r-- | src/js/components/SideBar/SideBarTabConfiguration.vue | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/js/components/SideBar/SideBarTabConfiguration.vue b/src/js/components/SideBar/SideBarTabConfiguration.vue index b62a831e..2ef11542 100644 --- a/src/js/components/SideBar/SideBarTabConfiguration.vue +++ b/src/js/components/SideBar/SideBarTabConfiguration.vue @@ -29,11 +29,14 @@ <ConfigBox v-if="!acl.isOwner" :title="t('polls', 'As an admin you may edit this poll')" icon-class="icon-checkmark" /> <ConfigBox :title="t('polls', 'Title')" icon-class="icon-sound"> - <input v-model="pollTitle" :class="{ error: titleEmpty }" type="text"> + <input v-model="pollTitle" :class="{ error: titleEmpty }" type="text" + @change="writeValue({ title: $event.target.value })" + @keyup.enter="writeValue({ title: $event.target.value })"> </ConfigBox> <ConfigBox :title="t('polls', 'Description')" icon-class="icon-edit"> - <textarea v-model="pollDescription" class="edit-description" /> + <textarea v-model="pollDescription" class="edit-description" + @change="writeValue({ description: $event.target.value })" /> </ConfigBox> <ConfigBox :title="t('polls', 'Poll configurations')" icon-class="icon-category-customization"> @@ -146,7 +149,8 @@ export default { return this.poll.description }, set(value) { - this.writeValueDebounced({ description: value }) + this.$store.commit('poll/setProperty', { description: value }) + this.$store.commit('poll/setDescriptionSafe', value) }, }, @@ -155,7 +159,7 @@ export default { return this.poll.title }, set(value) { - this.writeValueDebounced({ title: value }) + this.$store.commit('poll/setProperty', { title: value }) }, }, |