Merge pull request #9 from acaloiaro/fix-using-single-shoice-spaced-as-logic-target

fix: using single choice spaced fields as logic targets broken
This commit is contained in:
Adriano Caloiaro 2025-02-20 08:48:19 -07:00 committed by GitHub
commit f9e71bd54c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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: "",

View file

@ -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: "",