1
0
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:
rivo 2024-06-22 17:20:42 +02:00 committed by GitHub
commit c38c796625
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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