From 9aefde1627510c6431681c68bc3f8846517ffdfa Mon Sep 17 00:00:00 2001 From: Csaba Apagyi Date: Fri, 10 Jun 2022 11:12:40 +0200 Subject: [PATCH] Fix select queries using custom scopes --- app/assets/javascripts/activeadmin_addons/all.js | 10 ++-------- .../activeadmin_addons/inputs/search-select.js | 5 +---- .../activeadmin_addons/inputs/selected-list.js | 5 +---- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/activeadmin_addons/all.js b/app/assets/javascripts/activeadmin_addons/all.js index 0846df99..ab387349 100644 --- a/app/assets/javascripts/activeadmin_addons/all.js +++ b/app/assets/javascripts/activeadmin_addons/all.js @@ -253,10 +253,7 @@ }); var query = { order: order, - q: { - groupings: [ textQuery ], - combinator: "and" - } + q: textQuery }; return query; }, @@ -537,10 +534,7 @@ }); var query = { order: order, - q: { - groupings: [ textQuery ], - combinator: "and" - } + q: textQuery }; return query; }, diff --git a/app/javascript/activeadmin_addons/inputs/search-select.js b/app/javascript/activeadmin_addons/inputs/search-select.js index 5c8b722f..0a32a2bd 100644 --- a/app/javascript/activeadmin_addons/inputs/search-select.js +++ b/app/javascript/activeadmin_addons/inputs/search-select.js @@ -39,10 +39,7 @@ var initializer = function() { var query = { order: order, - q: { - groupings: [textQuery], - combinator: 'and', - }, + q: textQuery, }; return query; diff --git a/app/javascript/activeadmin_addons/inputs/selected-list.js b/app/javascript/activeadmin_addons/inputs/selected-list.js index 3613bd45..24cb94d7 100644 --- a/app/javascript/activeadmin_addons/inputs/selected-list.js +++ b/app/javascript/activeadmin_addons/inputs/selected-list.js @@ -42,10 +42,7 @@ var initializer = function() { var query = { order: order, - q: { - groupings: [textQuery], - combinator: 'and', - }, + q: textQuery, }; return query;