textprompt

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompleteMsg

type CompleteMsg struct {
	ID    string
	Value string
}

type TextPrompt

type TextPrompt struct {
	ID string

	Prompt string
	Tag    string
	// contains filtered or unexported fields
}

func NewTextPrompt

func NewTextPrompt(id string, args TextPromptArgs) TextPrompt

func (*TextPrompt) Blur

func (m *TextPrompt) Blur()

Blur removes the focus state on the model. When the model is blurred it can not receive keyboard input and the cursor will be hidden.

func (*TextPrompt) Focus

func (m *TextPrompt) Focus() tea.Cmd

Focus sets the focus state on the model. When the model is in focus it can receive keyboard input and the cursor will be shown.

func (TextPrompt) Init

func (m TextPrompt) Init() tea.Cmd

func (*TextPrompt) SetValue

func (m *TextPrompt) SetValue(value string)

func (TextPrompt) Update

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

func (TextPrompt) UpdateTextPrompt

func (m TextPrompt) UpdateTextPrompt(msg tea.Msg) (TextPrompt, tea.Cmd)

func (TextPrompt) Value

func (m TextPrompt) Value() string

func (TextPrompt) View

func (m TextPrompt) View() string

type TextPromptArgs

type TextPromptArgs struct {
	ID                string
	Placeholder       string
	Validator         validation.StringValidator
	InFlightValidator validation.StringValidator
	Prompt            string
	Tag               string
}

Jump to

Keyboard shortcuts

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