Sha256: d5e3858b133e0ae894b2a9ab12e404f8f0a59fa6f593ee4ef7330ccaf65e968a

Contents?: true

Size: 591 Bytes

Versions: 3

Compression:

Stored size: 591 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  class FacetFieldListComponent < ::ViewComponent::Base
    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

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-7.24.0 app/components/blacklight/facet_field_list_component.rb
blacklight-7.23.0.1 app/components/blacklight/facet_field_list_component.rb
blacklight-7.23.0 app/components/blacklight/facet_field_list_component.rb