Sha256: 5594f7f7f579aeb1e3c591819d6b02bb954fbf20ae7b1ebd95a48968ef982d7d
Contents?: true
Size: 856 Bytes
Versions: 27
Compression:
Stored size: 856 Bytes
Contents
# frozen_string_literal: true module Blacklight module Response # Render a group of facet fields class FacetGroupComponent < ::ViewComponent::Base # @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 @view_context.has_facet_values?(@fields, @response) end end end end end
Version data entries
27 entries across 27 versions & 1 rubygems