input

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: GPL-3.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 Model

type Model struct {
	State State

	Creating  bool
	Path      []string
	Type      backend.ItemType
	OldFields []string
	// contains filtered or unexported fields
}

Model contains the state of this tab

func New

func New(itemType backend.ItemType, creating bool, fields []string, path []string, oldFields []string) Model

New creates a new instance of the create item model

func (Model) GetValues

func (m Model) GetValues() []string

GetValues returns the values of the inputs

func (Model) Index

func (m Model) Index() int

Index returns the index of the active input

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

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

Update the model

func (Model) View

func (m Model) View() string

View the selected input

type State

type State int
const (
	Normal State = iota
	Cancel
	Finished
	NotEnoughText
)

Jump to

Keyboard shortcuts

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