page

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

func New

func New(
	width, height int,
	filterPrefix, loadingString string,
	selectionEnabled, wrapText, requestInput bool,
	viewportConditionalStyle map[string]lipgloss.Style,
) 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) ScrollViewportToBottom added in v0.2.0

func (m *Model) ScrollViewportToBottom()

func (*Model) SetAllPageData

func (m *Model) SetAllPageData(allPageData []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) 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) 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) 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