Sha256: e52255029e651718fd36addc40eeb032bba8e50d15aadd4d7bcff4e76ffef08f

Contents?: true

Size: 593 Bytes

Versions: 21

Compression:

Stored size: 593 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  class FacetFieldListComponent < Blacklight::Component
    def initialize(facet_field:, layout: nil)
      @facet_field = facet_field
      @layout = layout == false ? FacetFieldNoLayoutComponent : Blacklight::FacetFieldComponent
    end

    # Here for backwards compatibility only.
    # @private
    def render_facet_limit_list(*args)
      Deprecation.silence(Blacklight::FacetsHelperBehavior) do
        helpers.render_facet_limit_list(*args)
      end
    end

    def render?
      @facet_field.paginator&.items&.any?
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
blacklight-7.40.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.39.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.38.0 app/components/blacklight/facet_field_list_component.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/components/blacklight/facet_field_list_component.rb
blacklight-7.37.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.36.2 app/components/blacklight/facet_field_list_component.rb
blacklight-7.36.1 app/components/blacklight/facet_field_list_component.rb
blacklight-7.36.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.35.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.34.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.33.1 app/components/blacklight/facet_field_list_component.rb
blacklight-7.33.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.32.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.31.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.30.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.29.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.28.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.27.1 app/components/blacklight/facet_field_list_component.rb
blacklight-7.27.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.26.1 app/components/blacklight/facet_field_list_component.rb