Skip to main content
Module

x/cliffy/mod.ts>GenericList

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class GenericList
extends GenericInput<T, V, S>
Re-export
Abstract
import { GenericList } from "https://deno.land/x/cliffy@v0.24.3/mod.ts";

Generic list prompt representation.

Constructors

new
GenericList(settings: S)

Properties

protected
listIndex: number
protected
listOffset: number
protected
options: S["options"]

Methods

protected
addChar(char: string): void
protected
body(): string | Promise<string>

Render options.

protected
deleteChar(): void
protected
deleteCharRight(): void
protected
getInfo(): string
protected
getList(): string

Render options list.

protected
getListHeight(): number

Get options row height.

protected
getListIndex(value?: string)
protected
abstract
getListItem(item: GenericListOptionSettings, isSelected?: boolean): string

Render option.

protected
getOptionByValue(value: string): GenericListOptionSettings | undefined

Find option by value.

protected
getPageOffset(index: number)
protected
handleEvent(event: KeyCode): Promise<void>

Handle user input event.

protected
match(): void
protected
message(): string
protected
moveCursorLeft(): void
protected
moveCursorRight(): void
protected
read(): Promise<boolean>

Read user input.

protected
selectNext(): void

Select next option.

protected
selectNextPage(): void

Select next page.

protected
selectPrevious(): void

Select previous option.

protected
selectPreviousPage(): void

Select previous page.

Static Methods

Set list option defaults.

Create list separator.