Class: Plushie::Widget::Table

Inherits:
Object
  • Object
show all
Includes:
RowValidation
Defined in:
lib/plushie/widget/table.rb

Overview

Data table with column definitions and optional sorting.

Examples:

table = Plushie::Widget::Table.new("users",
  columns: [{ key: "name", label: "Name" }, { key: "email", label: "Email" }],
  sort_by: "name", sort_order: :asc)
node = table.build

Defined Under Namespace

Modules: RowValidation

Instance Method Summary collapse

Instance Method Details

#initialize(id, **opts) ⇒ Object Originally defined in module RowValidation

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Validate rows on construction and set_rows.

#set_rows(rows) ⇒ Object Originally defined in module RowValidation

Override set_rows with validation.