Class: Blacklight::FacetFieldComponent

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

Constant Summary

Constants inherited from Component

Component::EXCLUDE_VARIABLES

Instance Method Summary collapse

Methods inherited from Component

compiler, config, #inspect

Constructor Details

#initialize(facet_field:) ⇒ FacetFieldComponent

Returns a new instance of FacetFieldComponent.

Parameters:



9
10
11
# File 'app/components/blacklight/facet_field_component.rb', line 9

def initialize(facet_field:)
  @facet_field = facet_field
end

Instance Method Details

#header_html_idObject



17
18
19
# File 'app/components/blacklight/facet_field_component.rb', line 17

def header_html_id
  "#{html_id}-header"
end

#html_idObject



13
14
15
# File 'app/components/blacklight/facet_field_component.rb', line 13

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