Class: Avo::Index::TableRowComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Avo::Index::TableRowComponent
- Includes:
- ResourcesHelper
- Defined in:
- app/components/avo/index/table_row_component.rb
Instance Attribute Summary collapse
-
#header_fields ⇒ Object
writeonly
Sets the attribute header_fields.
Instance Method Summary collapse
-
#initialize(resource: nil, reflection: nil, parent_record: nil, parent_resource: nil, actions: nil, fields: nil, header_fields: nil) ⇒ TableRowComponent
constructor
A new instance of TableRowComponent.
- #resource_controls_component ⇒ Object
Methods included from ResourcesHelper
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_select_all_input, #item_selector_init, #item_selector_input, #resource_grid, #resource_table
Methods inherited from BaseComponent
Constructor Details
#initialize(resource: nil, reflection: nil, parent_record: nil, parent_resource: nil, actions: nil, fields: nil, header_fields: nil) ⇒ TableRowComponent
Returns a new instance of TableRowComponent.
8 9 10 11 12 13 14 15 16 |
# File 'app/components/avo/index/table_row_component.rb', line 8 def initialize(resource: nil, reflection: nil, parent_record: nil, parent_resource: nil, actions: nil, fields: nil, header_fields: nil) @resource = resource @reflection = reflection @parent_record = parent_record @parent_resource = parent_resource @actions = actions @fields = fields @header_fields = header_fields end |
Instance Attribute Details
#header_fields=(value) ⇒ Object (writeonly)
Sets the attribute header_fields
6 7 8 |
# File 'app/components/avo/index/table_row_component.rb', line 6 def header_fields=(value) @header_fields = value end |
Instance Method Details
#resource_controls_component ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'app/components/avo/index/table_row_component.rb', line 18 def resource_controls_component Avo::Index::ResourceControlsComponent.new( resource: @resource, reflection: @reflection, parent_record: @parent_record, parent_resource: @parent_resource, view_type: :table, actions: @actions ) end |