diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-01-16 23:03:20 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-01-16 23:03:20 +0300 |
commit | 142be72a2aa6920fa60cc267737f2e702fdeae12 (patch) | |
tree | 0bf4451385041f2d9ad414d098c85d178105e10c /app/assets | |
parent | 79373bdc5c025f189f3f17162945765a2617e820 (diff) | |
parent | f0ed80a234c75585685625c7c125cdd0fb832978 (diff) |
Merge branch '26616-fix-search-group-project-filters' into 'master'
Fix search group/project filtering to show results
Closes #26616
See merge request !8565
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/search.js | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js index bb516b3d2df..00859728c30 100644 --- a/app/assets/javascripts/gl_dropdown.js +++ b/app/assets/javascripts/gl_dropdown.js @@ -476,7 +476,7 @@ this.removeArrayKeyEvent(); $input = this.dropdown.find(".dropdown-input-field"); if (this.options.filterable) { - $input.blur().val(""); + $input.blur(); } if (this.dropdown.find(".dropdown-toggle-page").length) { $('.dropdown-menu', this.dropdown).removeClass(PAGE_TWO_CLASS); diff --git a/app/assets/javascripts/search.js b/app/assets/javascripts/search.js index 4b6ebadeac7..5945cab4cf0 100644 --- a/app/assets/javascripts/search.js +++ b/app/assets/javascripts/search.js @@ -12,6 +12,9 @@ selectable: true, filterable: true, fieldName: 'group_id', + search: { + fields: ['name'] + }, data: function(term, callback) { return Api.groups(term, {}, function(data) { data.unshift({ @@ -40,6 +43,9 @@ selectable: true, filterable: true, fieldName: 'project_id', + search: { + fields: ['name'] + }, data: function(term, callback) { return Api.projects(term, 'id', function(data) { data.unshift({ |