form

package
v0.3.23 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabeledInput

type LabeledInput struct {
	textinput.Model

	Label string
}

func NewLabeledInput

func NewLabeledInput(label string, input textinput.Model) LabeledInput

type LabeledInputs

type LabeledInputs []LabeledInput

func (LabeledInputs) Find

func (l LabeledInputs) Find(label string) (int, *LabeledInput)

type Mode

type Mode int
const (
	SubmitMode Mode = iota
	UpdateMode
)

type Model

type Model struct {
	// contains filtered or unexported fields
}

func New

func New(onSubmitFunc func(LabeledInputs) tea.Cmd, onUpdateFunc func(LabeledInputs) tea.Cmd, inputs ...LabeledInput) Model

func (*Model) Blur

func (m *Model) Blur()

func (*Model) Focus

func (m *Model) Focus(mode Mode) tea.Cmd

func (*Model) GetHeight added in v0.3.2

func (m *Model) GetHeight() int

func (*Model) GetWidth added in v0.3.2

func (m *Model) GetWidth() int

func (*Model) IsTyping

func (m *Model) IsTyping() bool

func (*Model) Reset

func (m *Model) Reset()

func (*Model) SetHeight

func (m *Model) SetHeight(height int)

func (*Model) SetWidth

func (m *Model) SetWidth(width int)

func (*Model) Update

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

func (*Model) UpdateInputs

func (m *Model) UpdateInputs(updateFunc func(inputs LabeledInputs))

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