Class: Daisy::DataDisplay::TableComponent::SectionComponent
- Inherits:
-
LocoMotion::BasicComponent
- Object
- LocoMotion::BaseComponent
- LocoMotion::BasicComponent
- Daisy::DataDisplay::TableComponent::SectionComponent
- Defined in:
- app/components/daisy/data_display/table_component.rb
Overview
A component for grouping related table content into sections. Each section can have its own header and body, allowing for complex table layouts.
Instance Method Summary collapse
Methods inherited from LocoMotion::BasicComponent
Instance Method Details
#before_render ⇒ Object
184 185 186 |
# File 'app/components/daisy/data_display/table_component.rb', line 184 def before_render set_tag_name :component, :section end |
#call ⇒ Object
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'app/components/daisy/data_display/table_component.rb', line 188 def call # Sections can't be rendered inside a `<table>` tag, so we don't render the # typical `part(:component)` here. concat(head) if head? if body? concat(body) else content_tag(:tbody) do rows.each do |row| concat(row) end end end end |