Documentation
¶
Index ¶
- Variables
- type Item
- type Keymap
- type Model
- func (m Model) FullHelp() [][]key.Binding
- func (m Model) GetItem(text string) (list.Item, bool)
- func (m Model) Index() int
- func (m Model) Init() tea.Cmd
- func (m *Model) IsEmpty() bool
- func (m Model) Items() []list.Item
- func (m Model) SelectedItem() list.Item
- func (m *Model) SetHeight(height int)
- func (m *Model) SetIndex(index int)
- func (m *Model) SetItems(items []list.Item)
- func (m Model) ShortHelp() []key.Binding
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeymap = Keymap{ Open: key.NewBinding( key.WithKeys("enter"), key.WithHelp("Enter", "Open"), ), Up: key.NewBinding( key.WithKeys("up", "k"), key.WithHelp("↑/k", "Move up"), ), Down: key.NewBinding( key.WithKeys("down", "j"), key.WithHelp("↓/j", "Move down"), ), PageUp: key.NewBinding( key.WithKeys("shift+up", "K"), key.WithHelp("shift+↑/K", "Page up"), ), PageDown: key.NewBinding( key.WithKeys("shift+down", "J"), key.WithHelp("shift+↓/J", "Page down"), ), QuickSelect: key.NewBinding( key.WithKeys("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"), key.WithHelp("0-9", "Quick select"), ), }
DefaultKeymap is the default keymap for the list
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
Item is an item in the list
func (Item) Description ¶
Description returns the description of the item
func (Item) FilterValue ¶
FilterValue returns the title of the item
type Keymap ¶
type Keymap struct { Open key.Binding Up key.Binding Down key.Binding PageUp key.Binding PageDown key.Binding QuickSelect key.Binding }
Keymap is the Keymap for the list
type Model ¶
type Model struct { Keymap Keymap // contains filtered or unexported fields }
Model contains state of the list
func (Model) SelectedItem ¶
SelectedItem returns the selected item
Click to show internal directories.
Click to hide internal directories.