table

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: MIT Imports: 4 Imported by: 121

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Border added in v0.2.0

type Border struct {
	Top         string
	Left        string
	Right       string
	Bottom      string
	TopRight    string
	TopLeft     string
	BottomRight string
	BottomLeft  string

	TopJunction    string
	LeftJunction   string
	RightJunction  string
	BottomJunction string

	InnerJunction string

	InnerDivider string
	// contains filtered or unexported fields
}

Border defines the borders in and around the table

type Header struct {
	Title string
	Key   string
	Width int
	// contains filtered or unexported fields
}

func NewHeader

func NewHeader(key, title string, width int) Header

type Model

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

func New

func New(headers []Header) Model

func (Model) Border added in v0.2.0

func (m Model) Border(border Border) Model

func (Model) BorderDefault added in v0.2.0

func (m Model) BorderDefault() Model

func (Model) Focused

func (m Model) Focused(focused bool) Model

func (Model) HeaderStyle

func (m Model) HeaderStyle(style lipgloss.Style) Model

func (Model) HighlightStyle

func (m Model) HighlightStyle(style lipgloss.Style) Model

func (Model) HighlightedRow

func (m Model) HighlightedRow() Row

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) SelectableRows

func (m Model) SelectableRows(selectable bool) Model

func (Model) SelectedRows

func (m Model) SelectedRows() []Row

func (Model) Update

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

func (Model) View

func (m Model) View() string

func (Model) WithRows

func (m Model) WithRows(rows []Row) Model

type MovementMode

type MovementMode int

type Row

type Row struct {
	Style lipgloss.Style
	Data  RowData
	// contains filtered or unexported fields
}

func NewRow

func NewRow(data RowData) Row

func (Row) WithStyle

func (r Row) WithStyle(style lipgloss.Style) Row

type RowData

type RowData map[string]interface{}

Jump to

Keyboard shortcuts

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