summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/filtered_search/dropdown_utils.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-03-10 17:40:38 +0000
committerPhil Hughes <me@iamphill.com>2017-03-16 08:42:41 +0000
commit09f7b9dc3260d9fa65b5aeec4576b6159cfb93b2 (patch)
tree4d97d4714b2c1beb17d3e54c1628dd5fdf4f12d4 /app/assets/javascripts/filtered_search/dropdown_utils.js
parenta9deabea00a1fa34bfeb8b6c421a99aa7568a5c8 (diff)
downloadgitlab-ce-09f7b9dc3260d9fa65b5aeec4576b6159cfb93b2.tar.gz
Created a container class for filtered search
This class returns the correct container the filtered search should be run in At the moment it doesn't allow for multiple to be used at once, need to look at a way to fix this [ci skip]
Diffstat (limited to 'app/assets/javascripts/filtered_search/dropdown_utils.js')
-rw-r--r--app/assets/javascripts/filtered_search/dropdown_utils.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/filtered_search/dropdown_utils.js b/app/assets/javascripts/filtered_search/dropdown_utils.js
index 77bf191f343..efd0b33b95d 100644
--- a/app/assets/javascripts/filtered_search/dropdown_utils.js
+++ b/app/assets/javascripts/filtered_search/dropdown_utils.js
@@ -1,3 +1,5 @@
+import { FilteredSearchContainer } from './container';
+
(() => {
class DropdownUtils {
static getEscapedText(text) {
@@ -85,7 +87,8 @@
// Determines the full search query (visual tokens + input)
static getSearchQuery(untilInput = false) {
- const tokens = [].slice.call(document.querySelectorAll('.tokens-container li'));
+ const container = FilteredSearchContainer.container;
+ const tokens = [].slice.call(container.querySelectorAll('.tokens-container li'));
const values = [];
if (untilInput) {