Skip to content

Commit 97bcf09

Browse files
fix(conditional): name checkbox branches after their options
Checkbox conditions store a combination in optionIds, but the branch label only read optionId, so every checkbox branch was called "Branch 1", "Branch 2" and so on, also in the names of its group and buttons. The label now lists the options of the combination. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent 8296c02 commit 97bcf09

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/components/Questions/QuestionConditional.vue‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,10 @@ export default defineComponent({
890890
this.triggerType,
891891
)
892892
) {
893-
const optionIds = branch.conditions.map((c) => c.optionId)
893+
// Checkbox conditions hold a combination of options
894+
const optionIds = branch.conditions.flatMap(
895+
(c) => c.optionIds ?? [c.optionId],
896+
)
894897
const optionTexts = optionIds
895898
.map((id) => this.options.find((o) => o.id === id)?.text)
896899
.filter(Boolean)

0 commit comments

Comments
 (0)