API
dropdown
import "github.com/aschey/bubbleprompt/suggestion/dropdown"
Index
- type Model
- func New[T any](textInput input.Input[T], options ...Option[T]) *Model[T]
- func (m *Model[T]) ClearSuggestions()
- func (m *Model[T]) DisableScrollbar()
- func (m *Model[T]) EnableScrollbar()
- func (m *Model[T]) Error() error
- func (m *Model[T]) Formatters() suggestion.Formatters
- func (m *Model[T]) Init() tea.Cmd
- func (m *Model[T]) IsSuggestionSelected() bool
- func (c Model[T]) MaxSuggestionWidth() (int, int)
- func (m *Model[T]) MaxSuggestions() int
- func (m *Model[T]) NextSuggestion()
- func (m *Model[T]) PreviousSuggestion()
- func (c Model[T]) Render(paddingSize int) string
- func (m *Model[T]) ResetSuggestions() tea.Cmd
- func (m *Model[T]) ScrollPosition() int
- func (m *Model[T]) Scrollbar() string
- func (c Model[T]) ScrollbarBounds() (int, int)
- func (m *Model[T]) ScrollbarThumb() string
- func (m *Model[T]) SelectSuggestion(suggestion suggestion.Suggestion[T])
- func (m *Model[T]) SelectedIndex() int
- func (m *Model[T]) SelectedSuggestion() *suggestion.Suggestion[T]
- func (m *Model[T]) SelectionIndicator() string
- func (m *Model[T]) SetFormatters(formatters suggestion.Formatters)
- func (m *Model[T]) SetMaxSuggestions(maxSuggestions int)
- func (m *Model[T]) SetSelectionIndicator(selectionIndicator string)
- func (m *Model[T]) SetShowSuggestions(showSuggestions bool)
- func (m *Model[T]) ShouldChangeListPosition(msg tea.Msg) bool
- func (m *Model[T]) Suggestions() []suggestion.Suggestion[T]
- func (m *Model[T]) UnselectSuggestion()
- func (m *Model[T]) Update(msg tea.Msg) tea.Cmd
- func (m *Model[T]) UpdateSuggestions() tea.Cmd
- func (m *Model[T]) VisibleSuggestions() []suggestion.Suggestion[T]
- type Option
type Model
type Model[T any] struct {
// contains filtered or unexported fields
}
func New
func New[T any](textInput input.Input[T], options ...Option[T]) *Model[T]
func (*Model[T]) ClearSuggestions
func (m *Model[T]) ClearSuggestions()
func (*Model[T]) DisableScrollbar
func (m *Model[T]) DisableScrollbar()
func (*Model[T]) EnableScrollbar
func (m *Model[T]) EnableScrollbar()
func (*Model[T]) Error
func (m *Model[T]) Error() error
func (*Model[T]) Formatters
func (m *Model[T]) Formatters() suggestion.Formatters
func (*Model[T]) Init
func (m *Model[T]) Init() tea.Cmd
func (*Model[T]) IsSuggestionSelected
func (m *Model[T]) IsSuggestionSelected() bool
func (Model[T]) MaxSuggestionWidth
func (c Model[T]) MaxSuggestionWidth() (int, int)
func (*Model[T]) MaxSuggestions
func (m *Model[T]) MaxSuggestions() int
func (*Model[T]) NextSuggestion
func (m *Model[T]) NextSuggestion()
func (*Model[T]) PreviousSuggestion
func (m *Model[T]) PreviousSuggestion()
func (Model[T]) Render
func (c Model[T]) Render(paddingSize int) string
func (*Model[T]) ResetSuggestions
func (m *Model[T]) ResetSuggestions() tea.Cmd
func (*Model[T]) ScrollPosition
func (m *Model[T]) ScrollPosition() int
func (*Model[T]) Scrollbar
func (m *Model[T]) Scrollbar() string
func (Model[T]) ScrollbarBounds
func (c Model[T]) ScrollbarBounds() (int, int)
func (*Model[T]) ScrollbarThumb
func (m *Model[T]) ScrollbarThumb() string
func (*Model[T]) SelectSuggestion
func (m *Model[T]) SelectSuggestion(suggestion suggestion.Suggestion[T])
func (*Model[T]) SelectedIndex
func (m *Model[T]) SelectedIndex() int
func (*Model[T]) SelectedSuggestion
func (m *Model[T]) SelectedSuggestion() *suggestion.Suggestion[T]
func (*Model[T]) SelectionIndicator
func (m *Model[T]) SelectionIndicator() string
func (*Model[T]) SetFormatters
func (m *Model[T]) SetFormatters(formatters suggestion.Formatters)
func (*Model[T]) SetMaxSuggestions
func (m *Model[T]) SetMaxSuggestions(maxSuggestions int)
func (*Model[T]) SetSelectionIndicator
func (m *Model[T]) SetSelectionIndicator(selectionIndicator string)
func (*Model[T]) SetShowSuggestions
func (m *Model[T]) SetShowSuggestions(showSuggestions bool)
func (*Model[T]) ShouldChangeListPosition
func (m *Model[T]) ShouldChangeListPosition(msg tea.Msg) bool
func (*Model[T]) Suggestions
func (m *Model[T]) Suggestions() []suggestion.Suggestion[T]
func (*Model[T]) UnselectSuggestion
func (m *Model[T]) UnselectSuggestion()
func (*Model[T]) Update
func (m *Model[T]) Update(msg tea.Msg) tea.Cmd
func (*Model[T]) UpdateSuggestions
func (m *Model[T]) UpdateSuggestions() tea.Cmd
func (*Model[T]) VisibleSuggestions
func (m *Model[T]) VisibleSuggestions() []suggestion.Suggestion[T]
type Option
type Option[T any] func(model *Model[T])
func WithFormatters
func WithFormatters[T any](formatters suggestion.Formatters) Option[T]
func WithMaxSuggestions
func WithMaxSuggestions[T any](maxSuggestions int) Option[T]
func WithSelectionIndicator
func WithSelectionIndicator[T any](indicator string) Option[T]
Generated by gomarkdoc