Documentation
¶
Index ¶
- type InputConfig
- type InputKeyMaps
- type ListConfig
- type Option
- type OptionsInput
- func (i OptionsInput) Help() []key.Binding
- func (i OptionsInput) Init() tea.Cmd
- func (i *OptionsInput) OnBlur()
- func (i *OptionsInput) OnFocus(id ...int64)
- func (i *OptionsInput) SetInput(text string)
- func (i OptionsInput) Update(msg tea.Msg) (OptionsInput, tea.Cmd)
- func (i OptionsInput) View() string
- type OptionsProvider
- func (o OptionsProvider[T, U]) GetSelected() Option
- func (o *OptionsProvider[T, U]) Help() []key.Binding
- func (o OptionsProvider[T, U]) Init() tea.Cmd
- func (o OptionsProvider[T, U]) IsFiltering() bool
- func (o OptionsProvider[T, U]) OnBlur()
- func (o *OptionsProvider[T, U]) OnFocus()
- func (o *OptionsProvider[T, U]) RefreshItems()
- func (o *OptionsProvider[T, U]) SetGetItemsFunc(getItems func(context.Context) ([]T, error))
- func (o OptionsProvider[T, U]) Update(msg tea.Msg) (OptionsProvider[T, U], tea.Cmd)
- func (o OptionsProvider[T, U]) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputConfig ¶
type InputConfig struct {
Prompt string
Placeholder string
CharLimit int
Width int
KeyMap InputKeyMaps
}
type ListConfig ¶
type ListConfig[T, U any] struct { OnSelectAction tea.Msg ShowPagination bool ShowStatusBar bool ShowHelp bool ShowTitle bool Width, Height int FilteringEnabled bool Delegate list.ItemDelegate KeyMap list.KeyMap AdditionalKeymaps *keybinds.ListKeyMap ItemMapper func([]T) []list.Item GetItemsFunc func(context.Context) ([]T, error) Source string }
type OptionsInput ¶
type OptionsInput struct {
// contains filtered or unexported fields
}
func NewOptionsInput ¶
func NewOptionsInput(config *InputConfig) OptionsInput
func (OptionsInput) Help ¶
func (i OptionsInput) Help() []key.Binding
func (OptionsInput) Init ¶
func (i OptionsInput) Init() tea.Cmd
func (*OptionsInput) OnBlur ¶
func (i *OptionsInput) OnBlur()
func (*OptionsInput) OnFocus ¶
func (i *OptionsInput) OnFocus(id ...int64)
func (*OptionsInput) SetInput ¶
func (i *OptionsInput) SetInput(text string)
func (OptionsInput) Update ¶
func (i OptionsInput) Update(msg tea.Msg) (OptionsInput, tea.Cmd)
func (OptionsInput) View ¶
func (i OptionsInput) View() string
type OptionsProvider ¶
type OptionsProvider[T, U any] struct { // contains filtered or unexported fields }
func NewOptionsProvider ¶
func NewOptionsProvider[T, U any](config *ListConfig[T, U]) OptionsProvider[T, U]
func (OptionsProvider[T, U]) GetSelected ¶
func (o OptionsProvider[T, U]) GetSelected() Option
func (*OptionsProvider[T, U]) Help ¶
func (o *OptionsProvider[T, U]) Help() []key.Binding
func (OptionsProvider[T, U]) Init ¶
func (o OptionsProvider[T, U]) Init() tea.Cmd
func (OptionsProvider[T, U]) IsFiltering ¶
func (o OptionsProvider[T, U]) IsFiltering() bool
func (OptionsProvider[T, U]) OnBlur ¶
func (o OptionsProvider[T, U]) OnBlur()
func (*OptionsProvider[T, U]) OnFocus ¶
func (o *OptionsProvider[T, U]) OnFocus()
func (*OptionsProvider[T, U]) RefreshItems ¶
func (o *OptionsProvider[T, U]) RefreshItems()
func (*OptionsProvider[T, U]) SetGetItemsFunc ¶
func (o *OptionsProvider[T, U]) SetGetItemsFunc(getItems func(context.Context) ([]T, error))
func (OptionsProvider[T, U]) Update ¶
func (o OptionsProvider[T, U]) Update(msg tea.Msg) (OptionsProvider[T, U], tea.Cmd)
func (OptionsProvider[T, U]) View ¶
func (o OptionsProvider[T, U]) View() string
Click to show internal directories.
Click to hide internal directories.