app/assets/javascripts/active_admin/pages/application.js.coffee in activeadmin-0.6.0 vs app/assets/javascripts/active_admin/pages/application.js.coffee in activeadmin-0.6.1
- old
+ new
@@ -10,7 +10,12 @@
# Batch Actions dropdown
$('.dropdown_button').popover()
# Filter form: don't send any inputs that are empty
- $('#q_search').submit ->
+ $('.filter_form').submit ->
$(@).find(':input').filter(-> @value is '').prop 'disabled', true
+
+ # Filter form: for filters that let you choose the query method from
+ # a dropdown, apply that choice to the filter input field.
+ $('.filter_form_field.select_and_search select').change ->
+ $(@).siblings('input').prop name: "q[#{@value}]"