optionlist

package
v0.0.0-...-56f1d57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator func(yield func(int, Row) bool)

type Option

type Option struct {
	Value string
}

func (Option) GetValue

func (o Option) GetValue() string

type OptionModel

type OptionModel struct {
	// contains filtered or unexported fields
}

func NewOptionModel

func NewOptionModel[T Options](options T) *OptionModel

func (*OptionModel) GetSelected

func (n *OptionModel) GetSelected() string

func (*OptionModel) GetSize

func (n *OptionModel) GetSize() (int, int)

func (*OptionModel) Init

func (n *OptionModel) Init() tea.Cmd

func (*OptionModel) Overlay

func (n *OptionModel) Overlay() helpers.UseOverlay

func (*OptionModel) Rows

func (n *OptionModel) Rows() int

func (*OptionModel) Update

func (n *OptionModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*OptionModel) View

func (n *OptionModel) View() string

type Options

type Options interface {
	Title() string
	Options() Iterator
}

type Row

type Row interface {
	GetValue() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL