component

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (*SuggestionTextInput) Value

func (s *SuggestionTextInput) Value() string

func (*SuggestionTextInput) View

func (s *SuggestionTextInput) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL