Class: Blacklight::Facets::FieldComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/blacklight/facets/field_component.rb

Direct Known Subclasses

Blacklight::FacetFieldComponent

Instance Method Summary collapse

Methods inherited from Component

reset_compiler!, sidecar_files, upstream_sidecar_files

Constructor Details

#initialize(facet_field:) ⇒ FieldComponent

Returns a new instance of FieldComponent.

Parameters:



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_idObject



18
19
20
# File 'app/components/blacklight/facets/field_component.rb', line 18

def header_html_id
  "#{html_id}-header"
end

#html_idObject



14
15
16
# File 'app/components/blacklight/facets/field_component.rb', line 14

def html_id
  "facet-#{@facet_field.key.parameterize}"
end