mirror of
https://github.com/rivo/tview.git
synced 2025-04-24 13:48:56 +08:00
Merge pull request #998 from SeRj-ThuramS/patch-1
Update dropdown.go to compile to lib.so
This commit is contained in:
commit
c38c796625
@ -275,10 +275,8 @@ func (d *DropDown) AddOption(text string, selected func()) *DropDown {
|
||||
func (d *DropDown) SetOptions(texts []string, selected func(text string, index int)) *DropDown {
|
||||
d.list.Clear()
|
||||
d.options = nil
|
||||
for index, text := range texts {
|
||||
func(t string, i int) {
|
||||
d.AddOption(text, nil)
|
||||
}(text, index)
|
||||
for _, text := range texts {
|
||||
d.AddOption(text, nil)
|
||||
}
|
||||
d.selected = selected
|
||||
return d
|
||||
|
Loading…
x
Reference in New Issue
Block a user