components

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SortDirection

type SortDirection int
const (
	SortAsc SortDirection = iota
	SortDesc
)

type SortMenuModel

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

func NewSortMenu

func NewSortMenu(options []SortOption) *SortMenuModel

func (*SortMenuModel) Close

func (m *SortMenuModel) Close()

func (*SortMenuModel) HandleKey

func (m *SortMenuModel) HandleKey(key string) (selected interface{}, shouldApply bool)

func (*SortMenuModel) IsVisible

func (m *SortMenuModel) IsVisible() bool

func (*SortMenuModel) Render

func (m *SortMenuModel) Render(currentSortField interface{}, sortDirection SortDirection) string

func (*SortMenuModel) Toggle

func (m *SortMenuModel) Toggle()

type SortOption

type SortOption struct {
	Label       string
	Description string
	Value       interface{}
}

type SortState

type SortState struct {
	Field     interface{}
	Direction SortDirection
	// contains filtered or unexported fields
}

func NewSortState

func NewSortState() *SortState

func (*SortState) ApplyDirection

func (s *SortState) ApplyDirection(less bool) bool

func (*SortState) GetIndicator

func (s *SortState) GetIndicator() string

func (*SortState) GetInfo

func (s *SortState) GetInfo(fieldName string) string

func (*SortState) IsEnabled

func (s *SortState) IsEnabled() bool

func (*SortState) IsField

func (s *SortState) IsField(field interface{}) bool

func (*SortState) Toggle

func (s *SortState) Toggle(newField interface{}) bool

Jump to

Keyboard shortcuts

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