Documentation
¶
Index ¶
- Variables
- func NewErrValidation(err error) error
- func WithOnAccept[T comparable](onAccept func() tea.Cmd) inputOptions[T]
- func WithRequired[T comparable]() inputOptions[T]
- func WithValidation[T comparable](parser ParseValidation[T]) inputOptions[T]
- func WithValidationFromType[T comparable, V CustomParseValidation[T]]() inputOptions[T]
- type CustomParseValidation
- type ErrValidation
- type Form
- type Item
- type ItemInput
- func (item *ItemInput[T]) Blur() Item
- func (item *ItemInput[T]) Focus() Item
- func (f *ItemInput[T]) ID() uint32
- func (item *ItemInput[T]) Set(v T, t string)
- func (item *ItemInput[T]) SetText(v string)
- func (item *ItemInput[T]) SetValue(v T)
- func (f *ItemInput[T]) Update(msg tea.Msg) (Item, tea.Cmd)
- func (item *ItemInput[T]) Value() T
- func (f ItemInput[T]) View() string
- type ItemLabel
- type NextItemMsg
- type ParseValidation
- type SubmitMsg
Constants ¶
This section is empty.
Variables ¶
View Source
var NextItemCmd = func() tea.Msg { return NextItemMsg{} }
View Source
var SubmitCmd = func() tea.Msg { return SubmitMsg{} }
Functions ¶
func NewErrValidation ¶
func WithOnAccept ¶
func WithOnAccept[T comparable](onAccept func() tea.Cmd) inputOptions[T]
func WithRequired ¶
func WithRequired[T comparable]() inputOptions[T]
func WithValidation ¶
func WithValidation[T comparable](parser ParseValidation[T]) inputOptions[T]
func WithValidationFromType ¶
func WithValidationFromType[T comparable, V CustomParseValidation[T]]() inputOptions[T]
Types ¶
type CustomParseValidation ¶
type ErrValidation ¶
type ErrValidation string
for parsing data in input values
func (ErrValidation) Error ¶
func (err ErrValidation) Error() string
type Item ¶
type ItemInput ¶
type ItemInput[T comparable] struct { // contains filtered or unexported fields }
Form item that for an input field
func Input ¶
func Input[T comparable](opts ...inputOptions[T]) *ItemInput[T]
type ItemLabel ¶
type ItemLabel struct {
// contains filtered or unexported fields
}
Form item that represent a label
type NextItemMsg ¶
type NextItemMsg struct{}
type ParseValidation ¶
Click to show internal directories.
Click to hide internal directories.