refs #969 Reset poll form when toggle the form
This commit is contained in:
parent
64fd8805c3
commit
aeed12cd59
|
@ -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('')
|
||||||
|
|
Loading…
Reference in New Issue