From c2c3679addf82f035f0900cabebd7cb8fdcf06e4 Mon Sep 17 00:00:00 2001 From: Mike Schinkel Date: Mon, 3 Jun 2019 20:40:09 -0400 Subject: [PATCH] Fix initialization bug in AddDropDown(), issue #290. --- form.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/form.go b/form.go index cbf3c54..a511f33 100644 --- a/form.go +++ b/form.go @@ -209,8 +209,8 @@ func (f *Form) AddPasswordField(label, value string, fieldWidth int, mask rune, func (f *Form) AddDropDown(label string, options []string, initialOption int, selected func(option string, optionIndex int)) *Form { f.items = append(f.items, NewDropDown(). SetLabel(label). - SetCurrentOption(initialOption). - SetOptions(options, selected)) + SetOptions(options, selected). + SetCurrentOption(initialOption)) return f }