diff --git a/src/components/Questions/AnswerInput.vue b/src/components/Questions/AnswerInput.vue index 1652ea4..94bacae 100644 --- a/src/components/Questions/AnswerInput.vue +++ b/src/components/Questions/AnswerInput.vue @@ -58,6 +58,11 @@ export default { data() { return { queue: new PQueue({ concurrency: 1 }), + + // As data instead of Method, to have a separate debounce per AnswerInput + debounceUpdateAnswer: pDebounce(function(answer) { + return this.queue.add(() => this.updateAnswer(answer)) + }, 500), } }, @@ -178,9 +183,6 @@ export default { console.error(error) } }, - debounceUpdateAnswer: pDebounce(function(answer) { - return this.queue.add(() => this.updateAnswer(answer)) - }, 500), }, }