()
| 55 | func (fb *FormButton) WidgetValue() any { return &fb.Struct } |
| 56 | |
| 57 | func (fb *FormButton) Init() { |
| 58 | fb.Button.Init() |
| 59 | fb.SetType(ButtonTonal).SetIcon(icons.Edit) |
| 60 | fb.Updater(func() { |
| 61 | fb.SetText(labels.FriendlyStructLabel(reflect.ValueOf(fb.Struct))) |
| 62 | }) |
| 63 | InitValueButton(fb, true, func(d *Body) { |
| 64 | fm := NewForm(d).SetStruct(fb.Struct) |
| 65 | fm.SetValueTitle(fb.ValueTitle).SetReadOnly(fb.IsReadOnly()) |
| 66 | if tb, ok := fb.Struct.(ToolbarMaker); ok { |
| 67 | d.AddAppBar(tb.MakeToolbar) |
| 68 | } |
| 69 | }) |
| 70 | } |
| 71 | |
| 72 | // KeyedListButton represents a map value with a button that opens a [KeyedList]. |
| 73 | type KeyedListButton struct { |
nothing calls this directly
no test coverage detected