refs #969 Reset poll form when toggle the form

This commit is contained in:
AkiraFukushima 2019-07-20 22:09:55 +09:00
parent 64fd8805c3
commit aeed12cd59
1 changed files with 6 additions and 1 deletions

View File

@ -149,7 +149,7 @@ export default {
showContentWarning: false, showContentWarning: false,
visibilityList: Visibility, visibilityList: Visibility,
openPoll: false, openPoll: false,
polls: ['', ''], polls: [],
pollExpire: { pollExpire: {
label: this.$t('modals.new_toot.poll.expires.1_day'), label: this.$t('modals.new_toot.poll.expires.1_day'),
value: 3600 * 24 value: 3600 * 24
@ -354,6 +354,11 @@ export default {
}, },
togglePollForm() { togglePollForm() {
this.openPoll = !this.openPoll this.openPoll = !this.openPoll
if (this.openPoll) {
this.polls = ['', '']
} else {
this.polls = []
}
}, },
addPoll() { addPoll() {
this.polls.push('') this.polls.push('')