Add autocompletion
This commit is contained in:
@ -83,6 +83,12 @@ func (a *Autocomplete) SetMinChars(min int) {
|
||||
a.minChars = min
|
||||
}
|
||||
|
||||
// SetSuggestions updates the available suggestions
|
||||
func (a *Autocomplete) SetSuggestions(suggestions []string) {
|
||||
a.allSuggestions = suggestions
|
||||
a.updateFilteredSuggestions()
|
||||
}
|
||||
|
||||
// Init initializes the autocomplete
|
||||
func (a *Autocomplete) Init() tea.Cmd {
|
||||
return textinput.Blink
|
||||
|
||||
Reference in New Issue
Block a user