table

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTable

func NewTable[T any](titles []string, rowRenderer RowRenderer[T], opts ...tableComponentOption[T]) *tableComponent[T]

func WithColumnWidths

func WithColumnWidths[T any](widths []int) tableComponentOption[T]

func WithHeight

func WithHeight[T any](h int) tableComponentOption[T]

func WithKeepOpenOnSelect

func WithKeepOpenOnSelect[T any](keepOpen bool) tableComponentOption[T]

func WithKeyActions

func WithKeyActions[T any](actions []KeyAction[T]) tableComponentOption[T]

func WithSelectDescription

func WithSelectDescription[T any](desc string) tableComponentOption[T]

func WithSelectFunc

func WithSelectFunc[T any](fn func(T)) tableComponentOption[T]

func WithStyles

func WithStyles[T any](s table.Styles) tableComponentOption[T]

func WithTitle

func WithTitle[T any](title string) tableComponentOption[T]

Types

type KeyAction

type KeyAction[T any] struct {
	Key         string
	Description string
	Action      func(T)
	ShowConfirm bool
}

type RowRenderer

type RowRenderer[T any] func(T) []string

Jump to

Keyboard shortcuts

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