Class: Phlexi::Table::Components::SelectionColumn

Inherits:
Column
  • Object
show all
Defined in:
lib/phlexi/table/components/selection_column.rb

Direct Known Subclasses

Base::SelectionColumn

Instance Attribute Summary

Attributes inherited from Base

#key, #options, #parent

Instance Method Summary collapse

Methods included from Concerns::DisplaysHeader

#colspan, #header_cell_attributes

Methods included from Options::Alignment

#alignment

Methods included from Options::Labels

#label

Methods inherited from Base

#dom_id, #initialize

Constructor Details

This class inherits a constructor from Phlexi::Table::Components::Base

Instance Method Details

#data_cell(wrapped_object) ⇒ Object



11
12
13
# File 'lib/phlexi/table/components/selection_column.rb', line 11

def data_cell(wrapped_object)
  SelectionCell.new(wrapped_object.field(key).dom.value)
end

#data_cell_attributes(wrapped_object) ⇒ Object



15
16
17
# File 'lib/phlexi/table/components/selection_column.rb', line 15

def data_cell_attributes(wrapped_object)
  {scope: :row}.merge(super)
end

#header_cellObject



7
8
9
# File 'lib/phlexi/table/components/selection_column.rb', line 7

def header_cell
  SelectionCell.new("all")
end