class

Tui::DataTable

Inherits Tui::Widget / Tui::Reactive / Reference / Object

Constructors

new(id : String | Nil = nil)
Source

Instance methods

add_column(key : String, label : String = "", width : Int32 | Nil = nil, align : Label::Align = Label::Align::Left) : Nil

Add a column

Source
add_row(data : Row) : Nil

Add a row

Source
add_row
Source
alt_row_style
Source
alt_row_style=(alt_row_style : Style)
Source
clear_rows

Clear all rows

Source
clear_selection

Clear selection

Source
columns
Source
columns=(columns : Array(Column))
Source
cursor_row

Property accessors

Source
cursor_row=(value : Int32) : Int32
Source
cursor_style
Source
cursor_style=(cursor_style : Style)
Source
header_style

Styles

Source
header_style=(header_style : Style)

Styles

Source
on_activate
Source
on_event(event : Event) : Bool

Override to handle events for this widget (target/bubble phase) Called after children have had a chance to handle the event

Source
on_select
Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
row_style
Source
row_style=(row_style : Style)
Source
rows
Source
rows=(rows : Array(Row))
Source
select_all

Select all

Source
selected_rows

Get selected rows

Source
selected_style
Source
selected_style=(selected_style : Style)
Source
show_header=(value : Bool) : Bool
Source
show_header?
Source
toggle_selection

Toggle selection on current row

Source
zebra_stripes=(value : Bool) : Bool
Source
zebra_stripes?
Source

Nested types