From ce05af1152e265cd2002fbd608bcdcd3cc99d7ff Mon Sep 17 00:00:00 2001 From: Adriano Caloiaro Date: Thu, 20 Feb 2025 08:46:44 -0700 Subject: [PATCH] fix: using single choice spaced fields as logic targets broken --- ui/builder/builder.templ | 2 +- ui/builder/builder_templ.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/builder/builder.templ b/ui/builder/builder.templ index a2e0865..56969b0 100644 --- a/ui/builder/builder.templ +++ b/ui/builder/builder.templ @@ -508,7 +508,7 @@ func actionLabelFor(action types.FieldLogicTriggerAction) string { // targetField: the target field chosen as the logic target templ LogicConfiguratorStepThree(form frm.Form, field types.FormField, targetField types.FormField) { switch targetField.Type { - case types.FormFieldTypeMultiSelect, types.FormFieldTypeSingleSelect, types.FormFieldTypeSingleChoice: + case types.FormFieldTypeMultiSelect, types.FormFieldTypeSingleSelect, types.FormFieldTypeSingleChoice, types.FormFieldTypeSingleChoiceSpaced: @selector.Selector(selector.SelectArgs{ ID: fmt.Sprintf("%s-logic-chosen-field-value", field.ID.String()), Label: "", diff --git a/ui/builder/builder_templ.go b/ui/builder/builder_templ.go index aa293a6..b844a0c 100644 --- a/ui/builder/builder_templ.go +++ b/ui/builder/builder_templ.go @@ -1499,7 +1499,7 @@ func LogicConfiguratorStepThree(form frm.Form, field types.FormField, targetFiel } ctx = templ.ClearChildren(ctx) switch targetField.Type { - case types.FormFieldTypeMultiSelect, types.FormFieldTypeSingleSelect, types.FormFieldTypeSingleChoice: + case types.FormFieldTypeMultiSelect, types.FormFieldTypeSingleSelect, types.FormFieldTypeSingleChoice, types.FormFieldTypeSingleChoiceSpaced: templ_7745c5c3_Err = selector.Selector(selector.SelectArgs{ ID: fmt.Sprintf("%s-logic-chosen-field-value", field.ID.String()), Label: "",