multiselect

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: LGPL-3.0 Imports: 3 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 {
	Items    []string
	Cursor   int
	Selected map[int]bool
	Ctx      context.Context
}

Model represents the UI state for the region selection menu

func InitialMultiselectModel

func InitialMultiselectModel(ctx context.Context, items []string) Model

InitialMultiselectModel creates a new Model with the given items and context

func UpdateMultiselectModel

func UpdateMultiselectModel(ctx context.Context, items []string, selected map[int]bool) Model

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the bubbletea model

func (Model) Update

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

Update handles user input and updates the model state accordingly

func (Model) View

func (m Model) View() string

View renders the current state of the region selection menu

Jump to

Keyboard shortcuts

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