Skip to content

Commit 9f6ce2b

Browse files
authored
Merge pull request #3618 from projectblacklight/backport-config
[Backport 8.x] Set constraints_component in the config
2 parents 5e4a1f6 + dd90d16 commit 9f6ce2b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/helpers/blacklight/catalog_helper_behavior.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def render_grouped_response? response = @response
197197
# Get the current "view type" (and ensure it is a valid type)
198198
#
199199
# @param [Hash] query_params the query parameters to check
200-
# @return [Symbol]
200+
# @return [Symbol] (e.g. :index, :gallery)
201201
def document_index_view_type query_params = params || {}
202202
view_param = query_params[:view]
203203
view_param ||= session[:preferred_view] if respond_to?(:session)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<%= render (blacklight_config&.view_config(document_index_view_type)&.constraints_component || Blacklight::ConstraintsComponent).new(search_state: search_state) %>
1+
<%= render blacklight_config&.view_config(document_index_view_type)&.constraints_component.new(search_state: search_state) %>

lib/blacklight/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def initialized_default_configuration?
168168
# component class used to render the facet grouping
169169
facet_group_component: nil,
170170
# component class used to render search constraints
171-
constraints_component: nil,
171+
constraints_component: Blacklight::ConstraintsComponent,
172172
# component class used to render the search bar
173173
search_bar_component: nil,
174174
# component class used to render the header above the documents

0 commit comments

Comments
 (0)