table

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 4 Imported by: 89

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

func NewHeader

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

func (Header) WithStyle

func (h Header) WithStyle(style lipgloss.Style) Header

type Model

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

func New

func New(headers []Header) 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