()
| 78 | func (kb *KeyedListButton) WidgetValue() any { return &kb.Map } |
| 79 | |
| 80 | func (kb *KeyedListButton) Init() { |
| 81 | kb.Button.Init() |
| 82 | kb.SetType(ButtonTonal).SetIcon(icons.Edit) |
| 83 | kb.Updater(func() { |
| 84 | kb.SetText(labels.FriendlyMapLabel(reflect.ValueOf(kb.Map))) |
| 85 | }) |
| 86 | InitValueButton(kb, true, func(d *Body) { |
| 87 | kl := NewKeyedList(d).SetMap(kb.Map) |
| 88 | kl.SetValueTitle(kb.ValueTitle).SetReadOnly(kb.IsReadOnly()) |
| 89 | d.AddAppBar(kl.MakeToolbar) |
| 90 | }) |
| 91 | } |
| 92 | |
| 93 | // TreeButton represents a [tree.Node] value with a button. |
| 94 | type TreeButton struct { |
nothing calls this directly
no test coverage detected