choiceinput

package
v2.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// Prompt and text input for the selection.
	textinput.Model

	// The list of possible choices.
	Choices []string

	// Indicates the value does not need to match a choice.
	Editable bool

	// Spinner to use while loading.
	LoadingSpinner spinner.Model
	// Message to display while loading (choices is nil).
	LoadingMessage string

	// Message to display if there are no results (choices is empty).
	NoResultsMessage string
	// contains filtered or unexported fields
}

func NewModel

func NewModel() Model

func (*Model) IsSelected

func (m *Model) IsSelected(i int) bool

func (*Model) Select

func (m *Model) Select(i int)

func (*Model) SelectLast added in v2.0.13

func (m *Model) SelectLast()

func (*Model) SelectOnly

func (m *Model) SelectOnly()

func (Model) Update

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

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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