fix(ui): prompt input being reset by lagging sync

This commit is contained in:
Guillaume Chau
2018-05-11 13:10:30 +02:00
parent e777a1623b
commit bafcaae55c

View File

@@ -13,12 +13,20 @@ export default {
}
},
data () {
return {
modifiedValue: undefined
}
},
methods: {
value (value) {
if (typeof this.modifiedValue !== 'undefined') return this.modifiedValue
return JSON.parse(value)
},
answer (value) {
this.modifiedValue = value
this.$emit('answer', value)
}
}