page

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.4.3

type Config struct {
	Width, Height                            int
	LoadingString                            string
	SelectionEnabled, WrapText, RequestInput bool
	CompactTableContent                      bool
	ViewportConditionalStyle                 map[string]lipgloss.Style
}

type Model

type Model struct {

	// if FilterWithContext is true, filtering doesn't remove rows, just highlights the matching text
	// and makes it so you can cycle through matches
	FilterWithContext bool
	// contains filtered or unexported fields
}

func New

func New(c Config, copySavePath, startFiltering, filterWithContext bool) Model

func (*Model) AppendToViewport added in v0.2.0

func (m *Model) AppendToViewport(rows []Row, startOnNewLine bool)

func (Model) EnteringInput added in v0.2.0

func (m Model) EnteringInput() bool

func (Model) FilterApplied

func (m Model) FilterApplied() bool

func (Model) FilterFocused

func (m Model) FilterFocused() bool

func (Model) GetSelectedPageRow

func (m Model) GetSelectedPageRow() (Row, error)

func (*Model) HideToast

func (m *Model) HideToast()

func (Model) Loading

func (m Model) Loading() bool

func (*Model) ResetContextFilter added in v0.13.0

func (m *Model) ResetContextFilter()

func (*Model) ScrollViewportToBottom added in v0.2.0

func (m *Model) ScrollViewportToBottom()

func (*Model) SetAllPageRows added in v0.13.0

func (m *Model) SetAllPageRows(allPageRows []Row)

func (*Model) SetDoesNeedNewInput added in v0.2.0

func (m *Model) SetDoesNeedNewInput()

func (*Model) SetFilterPrefix

func (m *Model) SetFilterPrefix(prefix string)

func (*Model) SetHeader

func (m *Model) SetHeader(header []string)

func (*Model) SetInputPrefix added in v0.2.0

func (m *Model) SetInputPrefix(p string)

func (*Model) SetLoading

func (m *Model) SetLoading(isLoading bool)

func (*Model) SetToast added in v1.1.0

func (m *Model) SetToast(toast toast.Model, style lipgloss.Style)

func (*Model) SetViewportPromptVisible added in v0.2.0

func (m *Model) SetViewportPromptVisible(v bool)

func (*Model) SetViewportSelectionEnabled added in v0.3.1

func (m *Model) SetViewportSelectionEnabled(v bool)

func (*Model) SetViewportSelectionToBottom

func (m *Model) SetViewportSelectionToBottom()

func (*Model) SetViewportSelectionToTop added in v1.1.0

func (m *Model) SetViewportSelectionToTop()

func (*Model) SetViewportStyle

func (m *Model) SetViewportStyle(headerStyle, contentStyle lipgloss.Style)

func (*Model) SetViewportXOffset

func (m *Model) SetViewportXOffset(n int)

func (*Model) SetWindowSize

func (m *Model) SetWindowSize(width, height int)

func (*Model) ToggleCompact added in v0.10.0

func (m *Model) ToggleCompact()

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

func (Model) ViewportHeight added in v0.2.0

func (m Model) ViewportHeight() int

func (Model) ViewportSaving

func (m Model) ViewportSaving() bool

func (Model) ViewportSelectionAtBottom added in v0.4.0

func (m Model) ViewportSelectionAtBottom() bool

type Row

type Row struct {
	Key, Row string
}

func (Row) String

func (r Row) String() string

Jump to

Keyboard shortcuts

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