Class: SdrViewComponents::Tables::ListCellComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- SdrViewComponents::Tables::ListCellComponent
- Defined in:
- app/components/sdr_view_components/tables/list_cell_component.rb
Overview
Component for rendering a list in a table cell.
Instance Attribute Summary collapse
-
#item_values ⇒ Object
readonly
Returns the value of attribute item_values.
Instance Method Summary collapse
-
#initialize(item_values: []) ⇒ ListCellComponent
constructor
A new instance of ListCellComponent.
- #list_items ⇒ Object
Methods inherited from BaseComponent
#args_for, #merge_actions, #merge_classes
Constructor Details
#initialize(item_values: []) ⇒ ListCellComponent
Returns a new instance of ListCellComponent.
9 10 11 12 13 |
# File 'app/components/sdr_view_components/tables/list_cell_component.rb', line 9 def initialize(item_values: []) # Provide items or item_values @item_values = item_values super() end |
Instance Attribute Details
#item_values ⇒ Object (readonly)
Returns the value of attribute item_values.
15 16 17 |
# File 'app/components/sdr_view_components/tables/list_cell_component.rb', line 15 def item_values @item_values end |
Instance Method Details
#list_items ⇒ Object
17 18 19 |
# File 'app/components/sdr_view_components/tables/list_cell_component.rb', line 17 def list_items items? ? items : item_values end |