Sha256: 19bde5868446260d2f991e2052366ffa49ea18f47b61b9a304821cfc6dfbe418
Contents?: true
Size: 850 Bytes
Versions: 25
Compression:
Stored size: 850 Bytes
Contents
# frozen_string_literal: true module Blacklight module Response # Render a group of facet fields class FacetGroupComponent < Blacklight::Component # @param [Blacklight::Response] response # @param [Array<String>] fields facet fields to render # @param [String] title the title of the facet group section # @param [String] id a unique identifier for the group def initialize(response:, fields: [], title: nil, id: nil) @response = response @fields = fields @title = title @id = id ? "facets-#{id}" : 'facets' @panel_id = id ? "facet-panel-#{id}-collapse" : 'facet-panel-collapse' end def render? Deprecation.silence(Blacklight::FacetsHelperBehavior) do helpers.has_facet_values?(@fields, @response) end end end end end
Version data entries
25 entries across 25 versions & 2 rubygems