app/components/blacklight/system/dropdown_component.rb in blacklight-8.0.0.beta1 vs app/components/blacklight/system/dropdown_component.rb in blacklight-8.0.0.beta2
- old
+ new
@@ -27,14 +27,14 @@
def button_label
t(:button_label_html, default: :label_html, scope: "blacklight.search.#{@param}", @interpolation => label_for_value(@selected))
end
def before_render
- button(classes: 'btn btn-outline-secondary dropdown-toggle', label: button_label) unless button
+ with_button(classes: 'btn btn-outline-secondary dropdown-toggle', label: button_label) unless button
return if options.any?
- options(@choices.map do |option|
+ with_options(@choices.map do |option|
text, value = option_text_and_value(option)
{ text: text, url: helpers.url_for(@search_state.params_for_search(@param => value)), selected: @selected == value }
end)
end