Documentation ¶
Index ¶
- type CompleteMsg
- type TextPrompt
- func (m *TextPrompt) Blur()
- func (m *TextPrompt) Focus() tea.Cmd
- func (m TextPrompt) Init() tea.Cmd
- func (m *TextPrompt) SetValue(value string)
- func (m TextPrompt) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m TextPrompt) UpdateTextPrompt(msg tea.Msg) (TextPrompt, tea.Cmd)
- func (m TextPrompt) Value() string
- func (m TextPrompt) View() string
- type TextPromptArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteMsg ¶
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) 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 }
Click to show internal directories.
Click to hide internal directories.