From c571e4a738a6cd06414753a3f44174beb4468058 Mon Sep 17 00:00:00 2001 From: Richard Nesnass Date: Wed, 5 Jun 2024 13:31:57 +0200 Subject: [PATCH 1/3] Allow single choice de-selection (skip) if required == false and multiple == false --- src/components/QuestionTypes/MultipleChoiceType.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/QuestionTypes/MultipleChoiceType.vue b/src/components/QuestionTypes/MultipleChoiceType.vue index ee1c8dbe..adcd17ef 100644 --- a/src/components/QuestionTypes/MultipleChoiceType.vue +++ b/src/components/QuestionTypes/MultipleChoiceType.vue @@ -90,7 +90,7 @@ } } }, - + methods: { addKeyListener() { this.removeKeyListener() @@ -144,16 +144,14 @@ this.question.other = this.dataValue = null this.setAnswer(this.dataValue) } - for (let i = 0; i < this.question.options.length; i++) { let o = this.question.options[i] - if (o.selected) { + if (o.selected && o !== option) { this._toggleAnswer(o) } } } - this._toggleAnswer(option) }, @@ -174,7 +172,7 @@ this.dataValue = option.selected ? optionValue : null } - + if (this.isValid() && this.question.nextStepOnAnswer && !this.question.multiple && !this.disabled) { this.$emit('next') } @@ -225,7 +223,7 @@ this.setAnswer(this.dataValue) } }, - + stopEditOther() { this.editingOther = false } From 0955340a2b609cdc15bfccb41b85df90f5471dba Mon Sep 17 00:00:00 2001 From: Richard Nesnass Date: Wed, 5 Jun 2024 13:38:05 +0200 Subject: [PATCH 2/3] Enable sourcemaps --- vue.config.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vue.config.js b/vue.config.js index fe9a26c8..6388f858 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,12 +7,16 @@ module.exports = { publicPath: '', pages: { index: { - // Replace with your .js entry file path. + // Replace with your .js entry file path. // To see the quiz example, use 'examples/quiz/main.js' // To see the support page example, use 'examples/support-page/main.js' - entry: entry || 'examples/questionnaire/main.js', + entry: entry || 'examples/quiz/main.js', //'examples/questionnaire/main.js', template: 'public/index.html', filename: 'index.html' } + }, + transpileDependencies: true, + configureWebpack: { + devtool: 'source-map', } -} \ No newline at end of file +} From b035ba2e0919e2c0d00405fc7f357a76baf10e35 Mon Sep 17 00:00:00 2001 From: Richard Nesnass Date: Wed, 5 Jun 2024 13:47:55 +0200 Subject: [PATCH 3/3] Revert vue.config.js --- vue.config.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vue.config.js b/vue.config.js index 6388f858..d1ff9fa4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -10,13 +10,9 @@ module.exports = { // Replace with your .js entry file path. // To see the quiz example, use 'examples/quiz/main.js' // To see the support page example, use 'examples/support-page/main.js' - entry: entry || 'examples/quiz/main.js', //'examples/questionnaire/main.js', + entry: entry || 'examples/questionnaire/main.js', template: 'public/index.html', filename: 'index.html' } - }, - transpileDependencies: true, - configureWebpack: { - devtool: 'source-map', } }