table

package
v0.0.0-...-6932d60 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field interface {
	View() string
	Key() string
	FilterValue() string
	MinWidth() int
}

type Fields

type Fields map[string]Field
type Header interface {
	View() string
	Init() tea.Cmd
	Update(tea.Msg) (Header, tea.Cmd)
	Key() string
	MinWidth() int
}

type Headers

type Headers interface {
	List() []Header

	InitHeader(string) tea.Cmd
	UpdateHeader(string, tea.Msg) (Headers, tea.Cmd)
}

type Item

type Item interface {
	Init() tea.Cmd
	Update(tea.Msg) (Item, tea.Cmd)

	Fields() Fields
	InitField(string) tea.Cmd
	UpdateField(string, tea.Msg) (Item, tea.Cmd)
}

type Items

type Items []Item

type Model

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

func New

func New(headers Headers, items Items) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

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