filterable_viewport

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterableViewport

type FilterableViewport[T viewport.RenderableComparable] struct {
	Filter filter.Model
	// contains filtered or unexported fields
}

func NewFilterableViewport

func NewFilterableViewport[T viewport.RenderableComparable](
	topHeader string,
	filterWithContext bool,
	startSelectionEnabled bool,
	startWrapOn bool,
	km keymap.KeyMap,
	width, height int,
	allRows []T,
	matchesFilter func(T, filter.Model) bool,
	viewWhenEmpty string,
) FilterableViewport[T]

func (FilterableViewport[T]) GetSelection

func (p FilterableViewport[T]) GetSelection() *T

func (FilterableViewport[T]) GetSelectionIdx

func (p FilterableViewport[T]) GetSelectionIdx() int

func (FilterableViewport[T]) HighjackingInput

func (p FilterableViewport[T]) HighjackingInput() bool

func (*FilterableViewport[T]) SetAllRows

func (p *FilterableViewport[T]) SetAllRows(allRows []T)

func (*FilterableViewport[T]) SetAllRowsAndMatchesFilter added in v0.2.0

func (p *FilterableViewport[T]) SetAllRowsAndMatchesFilter(allRows []T, matchesFilter func(T, filter.Model) bool)

func (*FilterableViewport[T]) SetBottomSticky

func (p *FilterableViewport[T]) SetBottomSticky(bottomSticky bool)

func (*FilterableViewport[T]) SetFocus added in v0.4.0

func (p *FilterableViewport[T]) SetFocus(focused bool, selectionEnabled bool)

func (*FilterableViewport[T]) SetMaintainSelection

func (p *FilterableViewport[T]) SetMaintainSelection(maintainSelection bool)

func (FilterableViewport[T]) SetSelectedContentIdx

func (p FilterableViewport[T]) SetSelectedContentIdx(idx int)

func (*FilterableViewport[T]) SetTopHeader added in v0.4.0

func (p *FilterableViewport[T]) SetTopHeader(topHeader string)

func (*FilterableViewport[T]) SetTopSticky

func (p *FilterableViewport[T]) SetTopSticky(topSticky bool)

func (*FilterableViewport[T]) SetUpDownMovementWithShift

func (p *FilterableViewport[T]) SetUpDownMovementWithShift()

func (*FilterableViewport[T]) ToggleFilteringWithContext

func (p *FilterableViewport[T]) ToggleFilteringWithContext()

func (FilterableViewport[T]) Update

func (p FilterableViewport[T]) Update(msg tea.Msg) (FilterableViewport[T], tea.Cmd)

func (FilterableViewport[T]) View

func (p FilterableViewport[T]) View() string

func (FilterableViewport[T]) WithDimensions

func (p FilterableViewport[T]) WithDimensions(width, height int) FilterableViewport[T]

Jump to

Keyboard shortcuts

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