Documentation ¶
Index ¶
- type Cell
- type Column
- type KeyMap
- type Model
- func (m *Model) AddRow()
- func (m Model) At(row, column int) string
- func (m *Model) Blur()
- func (m Model) Columns() int
- func (m Model) Cursor() (int, int)
- func (m Model) Errors() []error
- func (m *Model) Focus()
- func (m *Model) GotoBottom() tea.Cmd
- func (m *Model) GotoTop() tea.Cmd
- func (m Model) Init() tea.Cmd
- func (m *Model) Move(y, x int) tea.Cmd
- func (m *Model) MoveDown(n int) tea.Cmd
- func (m *Model) MoveLeft(n int) tea.Cmd
- func (m *Model) MoveRight(n int) tea.Cmd
- func (m *Model) MoveToNextCell() tea.Cmd
- func (m *Model) MoveUp(n int) tea.Cmd
- func (m *Model) RemoveRow(n int)
- func (m Model) Rows() int
- func (m *Model) SetColumns(c []Column)
- func (m *Model) SetStyles(s Styles)
- func (m Model) Titles() []string
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) Validate()
- func (m Model) Values() [][]string
- func (m Model) View() string
- type Option
- type Row
- type Styles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyMap ¶
type KeyMap struct { CellUp key.Binding CellDown key.Binding CellLeft key.Binding CellRight key.Binding NextCell key.Binding NewRow key.Binding PageUp key.Binding PageDown key.Binding GotoTop key.Binding GotoBottom key.Binding }
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
type Model ¶
type Model struct { KeyMap KeyMap // contains filtered or unexported fields }
func (*Model) GotoBottom ¶
func (*Model) MoveToNextCell ¶
func (*Model) SetColumns ¶
type Option ¶
type Option func(*Model)
Option is used to set options in New. For example:
table := New(WithColumns([]Column{{Title: "ID", Width: 10}}))
func IsOptional ¶ added in v1.2.1
func WithColumns ¶
func WithKeyMap ¶
func WithStyles ¶
Click to show internal directories.
Click to hide internal directories.