Documentation
¶
Index ¶
- Constants
- type Model
- func (m Model) Append(rows ...Row[V])
- func (m Model) ApplyFilter(fn func(V) bool)
- func (m Model) CursorIndex() int
- func (m Model) CursorValue() V
- func (w Model) DeleteAll()
- func (t *Model[V]) EnableDebug()
- func (m *Model[V]) Focus(focus bool)
- func (m *Model[V]) Height(height int)
- func (m Model[V]) Init() tea.Cmd
- func (m Model) PageDown()
- func (m Model) PageUp()
- func (m Model) RemoveFilter()
- func (t *Model[V]) SetSortFunc(fn func(V, V) int)
- func (m Model[V]) Update(msg tea.Msg) (Model[V], tea.Cmd)
- func (m Model[V]) View() string
- type Row
- type StyleFunc
Constants ¶
View Source
const HeaderRow int = -1
HeaderRow denotes the header's row index used when rendering headers. Use this value when looking to customize header styles in StyleFunc.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model[V comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[V comparable](headers ...string) Model[V]
func (Model) ApplyFilter ¶
func (m Model) ApplyFilter(fn func(V) bool)
func (Model) CursorIndex ¶
func (m Model) CursorIndex() int
func (Model) CursorValue ¶
func (m Model) CursorValue() V
func (*Model[V]) EnableDebug ¶
func (t *Model[V]) EnableDebug()
func (Model) RemoveFilter ¶
func (m Model) RemoveFilter()
func (*Model[V]) SetSortFunc ¶
type Row ¶
type Row[V comparable] struct { V V Cells []string }
Click to show internal directories.
Click to hide internal directories.