choiceinput

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 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.
	LoadingMessage 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) 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