Sha256: 35eab70edba6741b714beb15af38946d6221d0dc05ef279aae0926904f81dc0a

Contents?: true

Size: 533 Bytes

Versions: 4

Compression:

Stored size: 533 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 < ::ViewComponent::Base
      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

4 entries across 4 versions & 1 rubygems

Version Path
blacklight-hierarchy-6.2.2 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-6.2.1 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-6.2.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-6.1.2 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb