Browse Source

DropDown now only uses List's main selected callback. Fixes #115

merge-requests/1/merge
Oliver 4 years ago
parent
commit
7d789421e3
  1. 2
      dropdown.go

2
dropdown.go

@ -190,7 +190,7 @@ func (d *DropDown) GetFieldWidth() int {
// callback is called when this option was selected. It may be nil.
func (d *DropDown) AddOption(text string, selected func()) *DropDown {
d.options = append(d.options, &dropDownOption{Text: text, Selected: selected})
d.list.AddItem(text, "", 0, selected)
d.list.AddItem(text, "", 0, nil)
return d
}

Loading…
Cancel
Save