func (s *Select) Draw() {
	if len(s.options) > 0 {
		s.InputField.SetText(s.options[0])
	}
	s.InputField.Draw()
}
Draw draw select
package component
import (
	"fmt"
	"github.com/jroimartin/gocui"
)
type Select struct {
	*InputField
	options      []string
	currentOpt   int
	isExpanded   bool
	ctype        ComponentType
	listColor    *Attributes
	listHandlers Handlers
}
func NewSelect(gui *gocui.Gui, label string, x, y, labelWidth, fieldWidth int) *Select {
	s := &Select{
		InputField:   NewInputField(gui, label, x, y, labelWidth, fieldWidth),
		listHandlers: make(Handlers),
		ctype:        TypeSelect,
	}
	s.AddHandler(gocui.KeyEnter, s.expandOpt)
	s.AddAttribute(gocui.ColorBlack, gocui.ColorWhite, gocui.ColorBlack, gocui.ColorGreen).
		AddListHandler('j', s.nextOpt).
		AddListHandler('k', s.preOpt).
		AddListHandler(gocui.KeyArrowDown, s.nextOpt).
		AddListHandler(gocui.KeyArrowUp, s.preOpt).
		AddListHandler(gocui.KeyEnter, s.selectOpt).
		SetEditable(false)
	return s
}
func (s *Select) AddOptions(opts ...string) *Select {
	for _, opt := range opts {
		s.options = append(s.options, opt)
	}
	return s
}
func (s *Select) AddOption(opt string) *Select {
	s.options = append(s.options, opt)
	return s
}
func (s *Select) AddAttribute(textColor, textBgColor, fgColor, bgColor gocui.Attribute) *Select {
	s.listColor = &Attributes{
		textColor:      textColor,
		textBgColor:    textBgColor,
		hilightColor:   fgColor,
		hilightBgColor: bgColor,
	}
	return s
}
func (s *Select) AddListHandler(key Key, handler Handler) *Select {
	s.listHandlers[key] = handler
	return s
}
func (s *Select) GetSelected() string {
	return s.options[s.currentOpt]
}
func (s *Select) Focus() {
	s.Gui.Cursor = true
	s.Gui.SetCurrentView(s.GetLabel())
}
func (s *Select) UnFocus() {
	s.Gui.Cursor = false
}
func (s *Select) GetType() ComponentType {
	return s.ctype
}
func (s *Select) Close() {
	s.InputField.Close()
	if s.isExpanded {
		for _, opt := range s.options {
			s.DeleteView(opt)
			s.DeleteKeybindings(opt)
		}
	}
}