Documentation
¶
Index ¶
- type CancelledMsg
- type KeyMap
- type Model
- func (m *Model) Close()
- func (m *Model) GetSelectedIndex() int
- func (m *Model) GetSelectedOption() Option
- func (m Model) Init() tea.Cmd
- func (m *Model) IsOpen() bool
- func (m *Model) Open()
- func (m *Model) SetOptions(options []Option)
- func (m *Model) SetPlaceholder(placeholder string)
- func (m *Model) SetSelectedIndex(index int)
- func (m *Model) SetSelectedValue(value interface{})
- func (m *Model) SetSize(width, height int)
- func (m *Model) SetTitle(title string)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type Option
- type SelectedMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the dropdown component
func (*Model) GetSelectedIndex ¶
GetSelectedIndex returns the currently selected index
func (*Model) GetSelectedOption ¶
GetSelectedOption returns the currently selected option
func (*Model) SetOptions ¶
SetOptions updates the dropdown options
func (*Model) SetPlaceholder ¶
SetPlaceholder sets the placeholder text
func (*Model) SetSelectedIndex ¶
SetSelectedIndex sets the selected index
func (*Model) SetSelectedValue ¶
func (m *Model) SetSelectedValue(value interface{})
SetSelectedValue sets the selected option by value
type Option ¶
type Option struct {
Label string
Value interface{}
}
Option represents a dropdown option
type SelectedMsg ¶
SelectedMsg is sent when an option is selected
Click to show internal directories.
Click to hide internal directories.