class TUI::OptionListSource

Overview

ListDataSource over a flat, static Array(FormEnumOption) — backs the dropdown picker popup's option list. Filters by substring match on each option's label; has no sort keys (a single flat list has nothing to cycle through — ListView's own keys.size > 1 guard already makes the 's' key a safe no-op here).

Defined in:

tui/widgets/option_list.cr

Constructors

Instance Method Summary

Instance methods inherited from class TUI::ListDataSource

reload(filter : String, sort : Symbol) : Nil reload, size : Int32 size, sort_keys : Array(Symbol) sort_keys, title(filter : String, sort_key : Symbol) : String title

Constructor Detail

def self.new(title : String, options : Array(FormEnumOption)) #

[View source]

Instance Method Detail

def option_at(index : Int32) : FormEnumOption #

[View source]
def reload(filter : String, sort : Symbol) : Nil #

[View source]
def size : Int32 #

[View source]
def sort_keys : Array(Symbol) #

[View source]
def title(filter : String, sort_key : Symbol) : String #

[View source]