components

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskSelector

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

TaskSelector provides multi-select functionality for tasks with search capabilities.

func NewTaskSelector

func NewTaskSelector(availableTasks []models.Task) *TaskSelector

NewTaskSelector creates a new task selector with the given available tasks.

func (*TaskSelector) DeselectAll

func (ts *TaskSelector) DeselectAll()

DeselectAll deselects all currently visible (filtered) tasks.

func (*TaskSelector) GetSelectedCount

func (ts *TaskSelector) GetSelectedCount() int

GetSelectedCount returns the number of currently selected tasks.

func (*TaskSelector) GetSelectedTasks

func (ts *TaskSelector) GetSelectedTasks() []models.Task

GetSelectedTasks returns a slice of currently selected tasks.

func (*TaskSelector) IsInSearchMode

func (ts *TaskSelector) IsInSearchMode() bool

IsInSearchMode returns true if the search mode is active.

func (*TaskSelector) MoveFocus

func (ts *TaskSelector) MoveFocus(direction int)

MoveFocus moves the focus up or down within the visible task list.

func (*TaskSelector) SelectAll

func (ts *TaskSelector) SelectAll()

SelectAll selects all currently visible (filtered) tasks.

func (*TaskSelector) SetSelectedTasks

func (ts *TaskSelector) SetSelectedTasks(tasks []models.Task)

SetSelectedTasks sets the initially selected tasks.

func (*TaskSelector) SetWidth

func (ts *TaskSelector) SetWidth(width int)

SetWidth stores the terminal width so the selector container, search input, and separator can shrink to fit narrow terminals.

func (*TaskSelector) ToggleSearch

func (ts *TaskSelector) ToggleSearch()

ToggleSearch toggles the search input visibility and focus.

func (*TaskSelector) ToggleSelected

func (ts *TaskSelector) ToggleSelected()

ToggleSelected toggles the selection state of the currently focused task.

func (*TaskSelector) Update

func (ts *TaskSelector) Update(msg tea.Msg) tea.Cmd

Update handles updates for the task selector component.

func (*TaskSelector) UpdateFilter

func (ts *TaskSelector) UpdateFilter()

UpdateFilter updates the task filter based on search input.

func (*TaskSelector) View

func (ts *TaskSelector) View() string

View renders the task selector component.

Jump to

Keyboard shortcuts

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