table

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Title string
	// MaxWidth is unused for now
	MaxWidth *int
	// contains filtered or unexported fields
}

type Model

type Model struct {
	Search  textinput.Model
	Columns []Column
	// contains filtered or unexported fields
}

func NewModel

func NewModel(columns []Column, rows []Row, itemTypeLabel string) Model

func (*Model) AppendRows

func (m *Model) AppendRows(rows []Row)

func (*Model) ClearRows

func (m *Model) ClearRows()

func (*Model) Filter

func (m *Model) Filter(filter string)

func (*Model) FirstItem

func (m *Model) FirstItem() int

func (*Model) GetCurrItem

func (m *Model) GetCurrItem() int

func (*Model) GetCurrRow

func (m *Model) GetCurrRow() Row

func (*Model) GetRowAt

func (m *Model) GetRowAt(index int) Row

func (*Model) LastItem

func (m *Model) LastItem() int

func (*Model) NextCol

func (m *Model) NextCol() int

func (*Model) NextItem

func (m *Model) NextItem() int

func (*Model) OnLineDown

func (m *Model) OnLineDown()

func (*Model) OnLineUp

func (m *Model) OnLineUp()

func (*Model) PrevCol

func (m *Model) PrevCol() int

func (*Model) PrevItem

func (m *Model) PrevItem() int

func (*Model) ResetCurrItem

func (m *Model) ResetCurrItem()

func (*Model) SetDimensions

func (m *Model) SetDimensions(dimensions constants.Dimensions)

func (*Model) SetRows

func (m *Model) SetRows(rows []Row)

func (*Model) SyncViewPortContent

func (m *Model) SyncViewPortContent()

func (Model) View

func (m Model) View() string

type Row

type Row []string

type TableSpec added in v0.0.2

type TableSpec struct {
	Name    string
	Columns []Column
}

Jump to

Keyboard shortcuts

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