Sha256: 495e0c192feb592c7bb0b47a990cdd63d305cc368ee16421651a889746f302fa

Contents?: true

Size: 532 Bytes

Versions: 13

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 < ::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.remove_facet_params(field_name, item.qvalue))
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
blacklight-hierarchy-6.1.1 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-6.1.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-6.0.2 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-6.0.1 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-6.0.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-5.4.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-5.3.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-5.2.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-5.1.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-5.0.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-4.3.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-4.2.1 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
blacklight-hierarchy-4.2.0 app/components/blacklight/hierarchy/selected_qfacet_value_component.rb