mirror of https://github.com/rivo/tview.git
DropDown now only uses List's main selected callback. Fixes #115
This commit is contained in:
parent
0a4caa5b6b
commit
7d789421e3
|
@ -190,7 +190,7 @@ func (d *DropDown) GetFieldWidth() int {
|
||||||
// callback is called when this option was selected. It may be nil.
|
// callback is called when this option was selected. It may be nil.
|
||||||
func (d *DropDown) AddOption(text string, selected func()) *DropDown {
|
func (d *DropDown) AddOption(text string, selected func()) *DropDown {
|
||||||
d.options = append(d.options, &dropDownOption{Text: text, Selected: selected})
|
d.options = append(d.options, &dropDownOption{Text: text, Selected: selected})
|
||||||
d.list.AddItem(text, "", 0, selected)
|
d.list.AddItem(text, "", 0, nil)
|
||||||
return d
|
return d
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue