mirror of
https://github.com/acaloiaro/frm
synced 2026-07-21 18:29:12 +00:00
fix: update fields when target logic field is (de)selected
This commit is contained in:
parent
6a3a2c9e3f
commit
142c0d8a46
3 changed files with 6 additions and 7 deletions
|
|
@ -404,7 +404,7 @@ templ fieldLogicConfiguration(form frm.Form, field types.FormField) {
|
|||
<div>
|
||||
<div
|
||||
data-hx-get={ frm.BuilderPathFormField(ctx, form.ID, field.ID.String(), "/logic/choices") }
|
||||
data-hx-trigger={ LogicConfiguratorTargetFieldSelected }
|
||||
data-hx-trigger={ FieldsFormUpdateEvent }
|
||||
data-hx-swap="innerHTML"
|
||||
data-hx-target={ fmt.Sprintf("#logic-field-value-chooser-%s", field.ID.String()) }
|
||||
data-hx-on:htmx:config-request="event.detail.parameters['id'] = event.detail.triggeringEvent.detail.value"
|
||||
|
|
@ -415,7 +415,7 @@ templ fieldLogicConfiguration(form frm.Form, field types.FormField) {
|
|||
Placeholder: "Choose a field",
|
||||
Options: fields.FieldsAsSelectorOptions(form, field.ID),
|
||||
SearchDisabled: true,
|
||||
SelectionChangeEvent: LogicConfiguratorTargetFieldSelected,
|
||||
SelectionChangeEvent: FieldsFormUpdateEvent,
|
||||
})
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1326,9 +1326,9 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var60 string
|
||||
templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.JoinStringErrs(LogicConfiguratorTargetFieldSelected)
|
||||
templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.JoinStringErrs(FieldsFormUpdateEvent)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/builder/builder.templ`, Line: 407, Col: 58}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/builder/builder.templ`, Line: 407, Col: 43}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var60))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1357,7 +1357,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
Placeholder: "Choose a field",
|
||||
Options: fields.FieldsAsSelectorOptions(form, field.ID),
|
||||
SearchDisabled: true,
|
||||
SelectionChangeEvent: LogicConfiguratorTargetFieldSelected,
|
||||
SelectionChangeEvent: FieldsFormUpdateEvent,
|
||||
}).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@
|
|||
\"
|
||||
_=\"
|
||||
\"
|
||||
><option selected disabled>
|
||||
</option></select><div id=\"
|
||||
><option></option></select><div id=\"
|
||||
\" data-args=\"
|
||||
\" _=\"
|
||||
\"></div><!-- when OptionsContent\n are present, their components render inside of this element when chosen -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue