Class: Blacklight::Facets::FieldComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Blacklight::Facets::FieldComponent
- Defined in:
- app/components/blacklight/facets/field_component.rb
Direct Known Subclasses
Instance Method Summary collapse
- #header_html_id ⇒ Object
- #html_id ⇒ Object
-
#initialize(facet_field:) ⇒ FieldComponent
constructor
A new instance of FieldComponent.
Methods inherited from Component
reset_compiler!, sidecar_files, upstream_sidecar_files
Constructor Details
#initialize(facet_field:) ⇒ FieldComponent
Returns a new instance of FieldComponent.
10 11 12 |
# File 'app/components/blacklight/facets/field_component.rb', line 10 def initialize(facet_field:) @facet_field = facet_field end |
Instance Method Details
#header_html_id ⇒ Object
18 19 20 |
# File 'app/components/blacklight/facets/field_component.rb', line 18 def header_html_id "#{html_id}-header" end |
#html_id ⇒ Object
14 15 16 |
# File 'app/components/blacklight/facets/field_component.rb', line 14 def html_id "facet-#{@facet_field.key.parameterize}" end |