Form fields and ToggleGroup items keyed by name and value; shared stableKey

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 14:44:58 -04:00
1 parent 37f432caf8
commit b57d8e7da7
5 files changed
+105 -20

No files matched your search

+1 -1
View File
@@ -293,7 +293,7 @@ func FormItem[T any](c *ui.Context, f *FormScope, name string, value *T, opts Fo
desc = msg(c, "form.checking")
}
var ctrl *ui.Element
field := formFieldBuild(c, opts.Label, FormFieldOptions{Required: opts.Required, Description: desc, Error: st.Error(name)}, f.horizontal, func() *ui.Element {
field := formFieldBuild(c, name, opts.Label, FormFieldOptions{Required: opts.Required, Description: desc, Error: st.Error(name)}, f.horizontal, func() *ui.Element {
ctrl = control()
return ctrl
})