Sha256: b7092fcb8a3f18dd4a5116ff8ef0fc9149691d311be67e444213d9dbc188d278

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

Stored size: 532 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  module Hierarchy
    # Standard display of a SELECTED facet value, no link, special span with class, and 'remove' button.
    class SelectedQfacetValueComponent < QfacetValueComponent
      def initialize(field_name:, item:)
        @field_name = field_name
        @item = item
      end

      attr_reader :field_name, :item

      def remove_href
        helpers.search_action_path(helpers.search_state.filter(field_name).remove(item.qvalue).params)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blacklight-hierarchy-6.4.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-6.3.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb