Sha256: 239e6de883e0ac6edec3880abdba98fea936f3b8028552515bc0f8b75ffe6846
Contents?: true
Size: 705 Bytes
Versions: 46
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true module Blacklight class FacetFieldFilterComponent < Blacklight::Component def initialize(facet_field:) @facet_field = facet_field end def render? @facet_field.facet_field.index_range.any? end def prefix @facet_field.paginator.prefix end def clear_facet_prefix_url @facet_field.paginator.params_for_resort_url('index', @facet_field.search_state.to_h.except(@facet_field.paginator.request_keys[:prefix])) end def facet_prefix_url(letter) @facet_field.paginator.params_for_resort_url('index', @facet_field.search_state.to_h.merge(@facet_field.paginator.request_keys[:prefix] => letter)) end end end
Version data entries
46 entries across 45 versions & 2 rubygems