Documentation ¶
Index ¶
- type Default
- type PrettyList
- type PrettyTable
- type PrettyTableFilter
- type SelectionModel
- func (m *SelectionModel[T]) GetSelected() []T
- func (m *SelectionModel[T]) Init() tea.Cmd
- func (m *SelectionModel[T]) SetAutoclear()
- func (m *SelectionModel[T]) SetSingleMode()
- func (m *SelectionModel[T]) Start() error
- func (m *SelectionModel[T]) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *SelectionModel[T]) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrettyList ¶
type PrettyList struct {
// contains filtered or unexported fields
}
func NewPrettyList ¶
func NewPrettyList(items []string) PrettyList
func (PrettyList) Print ¶
func (l PrettyList) Print()
type PrettyTable ¶
type PrettyTable struct {
// contains filtered or unexported fields
}
func NewPrettyTable ¶
func NewPrettyTable(title string, headers []string, rows [][]string) PrettyTable
func (*PrettyTable) Print ¶
func (t *PrettyTable) Print()
func (*PrettyTable) SetAutoIndex ¶
func (t *PrettyTable) SetAutoIndex(autoIndex bool)
func (*PrettyTable) SetFilter ¶
func (t *PrettyTable) SetFilter(filter PrettyTableFilter)
func (*PrettyTable) Write ¶
func (t *PrettyTable) Write(wr io.StringWriter)
type PrettyTableFilter ¶
type PrettyTableFilter struct { Key string `help:"filter target key (column)"` Value string `help:"filter target value"` FizzyMatch bool `default:"true" help:"enable fizzy match on value"` SortedBy []string `help:"sort keys"` Show []string `help:"show specific columns"` Hide []string `help:"hide specific columns"` }
type SelectionModel ¶
type SelectionModel[T any] struct { // contains filtered or unexported fields }
func NewSelection ¶
func NewSelection[T any](title string, options []T, getlabel func(T) string) *SelectionModel[T]
func NewStringSelection ¶
func NewStringSelection(title string, options []string) *SelectionModel[string]
func (*SelectionModel[T]) GetSelected ¶
func (m *SelectionModel[T]) GetSelected() []T
func (*SelectionModel[T]) Init ¶
func (m *SelectionModel[T]) Init() tea.Cmd
func (*SelectionModel[T]) SetAutoclear ¶
func (m *SelectionModel[T]) SetAutoclear()
func (*SelectionModel[T]) SetSingleMode ¶
func (m *SelectionModel[T]) SetSingleMode()
func (*SelectionModel[T]) Start ¶
func (m *SelectionModel[T]) Start() error
func (*SelectionModel[T]) View ¶
func (m *SelectionModel[T]) View() string
Click to show internal directories.
Click to hide internal directories.