Help us shape the future of Go! Take the 2026 Go Developer Survey

selector

package
v1.58.8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item interface {
	Render(selected bool) string
}

type Model

type Model[I Item] struct {
	// contains filtered or unexported fields
}

func New

func New[I Item](data []I, perPage int) Model[I]

func (*Model[I]) Blur

func (m *Model[I]) Blur() tea.Cmd

func (*Model[I]) Focus

func (m *Model[I]) Focus() tea.Cmd

func (Model[I]) Selected

func (m Model[I]) Selected() (I, bool)

func (Model[I]) Update

func (m Model[I]) Update(msg tea.Msg) (Model[I], tea.Cmd)

Update method responds to various events and modifies the data model according to the corresponding events

func (Model[I]) View

func (m Model[I]) View() string

Jump to

Keyboard shortcuts

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