diff --git a/src/components/Questions/AnswerInput.vue b/src/components/Questions/AnswerInput.vue index 6e28b9c..c7fc60d 100644 --- a/src/components/Questions/AnswerInput.vue +++ b/src/components/Questions/AnswerInput.vue @@ -114,21 +114,8 @@ export default { // Dismiss delete key action e.preventDefault() - const answer = Object.assign({}, this.answer) - const index = this.index - if (!answer.local) { - // let's not await, deleting in background - axios.delete(generateUrl('/apps/forms/api/v1/option/{id}', { id: this.answer.id })) - .catch(error => { - showError(t('forms', 'There was an issue deleting this option')) - console.error(error) - // restore option - this.$emit('restore', answer, index) - }) - } - - this.$emit('delete', answer.id, index) + this.$emit('delete', this.answer.id) }, /** diff --git a/src/components/Questions/QuestionMultiple.vue b/src/components/Questions/QuestionMultiple.vue index b433942..2184490 100644 --- a/src/components/Questions/QuestionMultiple.vue +++ b/src/components/Questions/QuestionMultiple.vue @@ -61,9 +61,8 @@ :index="index" :max-option-length="maxStringLengths.optionText" @add="addNewEntry" - @delete="deleteAnswer" - @update:answer="updateAnswer" - @restore="restoreAnswer" /> + @delete="deleteOption" + @update:answer="updateAnswer" />