class RatatuiRuby::Table
A widget that displays data in a grid with rows and columns.
- header
-
An array of strings or Paragraphs representing the header row.
- rows
-
An array of arrays of strings or Paragraphs representing the data rows.
- widths
-
An array of
Constraintobjects defining column widths. - highlight_style
-
The style for the selected row.
- highlight_symbol
-
The symbol to display in front of the selected row.
- selected_row
-
The index of the currently selected row, or nil if none.
- block
-
An optional
Blockwidget to wrap the table.
Public Class Methods
Source
# File lib/ratatui_ruby/schema/table.rb, line 26 def initialize(header: nil, rows: [], widths: [], highlight_style: nil, highlight_symbol: "> ", selected_row: nil, block: nil) super end
- header
-
An array of strings or Paragraphs representing the header row.
- rows
-
An array of arrays of strings or Paragraphs representing the data rows.
- widths
-
An array of
Constraintobjects defining column widths. - highlight_style
-
The style for the selected row.
- highlight_symbol
-
The symbol to display in front of the selected row.
- selected_row
-
The index of the currently selected row, or nil if none.
- block
-
An optional
Blockwidget to wrap the table.