Class: Blacklight::FacetFieldListComponent
- Inherits:
-
Component
- Object
- ViewComponent::Base
- Component
- Blacklight::FacetFieldListComponent
- Defined in:
- app/components/blacklight/facet_field_list_component.rb
Instance Method Summary collapse
-
#initialize(facet_field:, layout: nil) ⇒ FacetFieldListComponent
constructor
A new instance of FacetFieldListComponent.
- #render? ⇒ Boolean
-
#render_facet_limit_list(*args) ⇒ Object
Here for backwards compatibility only.
Methods inherited from Component
Constructor Details
#initialize(facet_field:, layout: nil) ⇒ FacetFieldListComponent
Returns a new instance of FacetFieldListComponent.
5 6 7 8 |
# File 'app/components/blacklight/facet_field_list_component.rb', line 5 def initialize(facet_field:, layout: nil) @facet_field = facet_field @layout = layout == false ? FacetFieldNoLayoutComponent : Blacklight::FacetFieldComponent end |
Instance Method Details
#render? ⇒ Boolean
18 19 20 |
# File 'app/components/blacklight/facet_field_list_component.rb', line 18 def render? @facet_field.paginator&.items&.any? end |
#render_facet_limit_list(*args) ⇒ Object
Here for backwards compatibility only.
12 13 14 15 16 |
# File 'app/components/blacklight/facet_field_list_component.rb', line 12 def render_facet_limit_list(*args) Deprecation.silence(Blacklight::FacetsHelperBehavior) do helpers.render_facet_limit_list(*args) end end |