Documentation ¶
Index ¶
- Variables
- type KeyMap
- type SuggestionTextInput
- func (s *SuggestionTextInput) Blur()
- func (s *SuggestionTextInput) Focus()
- func (s *SuggestionTextInput) SetSuggestions(suggestions []string)
- func (s *SuggestionTextInput) SetValue(val string)
- func (s *SuggestionTextInput) SetWidth(width int)
- func (s *SuggestionTextInput) Update(msg tea.Msg) (*SuggestionTextInput, tea.Cmd)
- func (s *SuggestionTextInput) Value() string
- func (s *SuggestionTextInput) View() string
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ AcceptSuggestion: key.NewBinding(key.WithKeys("tab")), NextSuggestion: key.NewBinding(key.WithKeys("down", "ctrl+n")), PrevSuggestion: key.NewBinding(key.WithKeys("up", "ctrl+p")), }
DefaultKeyMap is the default set of key bindings for navigating and acting upon the textinput.
Functions ¶
This section is empty.
Types ¶
type KeyMap ¶
type KeyMap struct { AcceptSuggestion key.Binding NextSuggestion key.Binding PrevSuggestion key.Binding }
KeyMap is the key bindings for different actions within the textinput.
type SuggestionTextInput ¶
type SuggestionTextInput struct { KeyMap KeyMap // contains filtered or unexported fields }
func NewSuggestionTextInput ¶
func NewSuggestionTextInput() *SuggestionTextInput
NewSuggestionTextInput creates a new model with default settings.
func (*SuggestionTextInput) Blur ¶
func (s *SuggestionTextInput) Blur()
func (*SuggestionTextInput) Focus ¶
func (s *SuggestionTextInput) Focus()
func (*SuggestionTextInput) SetSuggestions ¶
func (s *SuggestionTextInput) SetSuggestions(suggestions []string)
func (*SuggestionTextInput) SetValue ¶
func (s *SuggestionTextInput) SetValue(val string)
func (*SuggestionTextInput) SetWidth ¶
func (s *SuggestionTextInput) SetWidth(width int)
func (*SuggestionTextInput) Update ¶
func (s *SuggestionTextInput) Update(msg tea.Msg) (*SuggestionTextInput, tea.Cmd)
func (*SuggestionTextInput) Value ¶
func (s *SuggestionTextInput) Value() string
func (*SuggestionTextInput) View ¶
func (s *SuggestionTextInput) View() string
Click to show internal directories.
Click to hide internal directories.