list

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT 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[T interface{}] struct {
	// contains filtered or unexported fields
}

func NewItem

func NewItem[T interface{}](title, prefix string, data T) Item[T]

func (Item[T]) Data

func (i Item[T]) Data() T

func (Item[T]) Description

func (i Item[T]) Description() string

func (Item[T]) FilterValue

func (i Item[T]) FilterValue() string

func (Item[T]) Prefix

func (i Item[T]) Prefix() string

func (Item[T]) Title

func (i Item[T]) Title() string

type Model

type Model[T interface{}] struct {
	// contains filtered or unexported fields
}

func InitialModel

func InitialModel[T interface{}](ctx *context.ProgramContext, title string) Model[T]

func (*Model[T]) GetSelected

func (m *Model[T]) GetSelected() (*Item[T], bool)

func (Model[T]) Init

func (m Model[T]) Init() tea.Cmd

func (*Model[T]) Resize

func (m *Model[T]) Resize(width, height int)

func (*Model[T]) SetItems

func (m *Model[T]) SetItems(items []Item[T])

func (Model[T]) Update

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

func (Model[T]) View

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

Jump to

Keyboard shortcuts

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