summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-11-16 14:54:07 +0000
committerPhil Hughes <me@iamphill.com>2016-11-16 14:56:50 +0000
commit3e336475141524dfaf583a05288fc82545955ac7 (patch)
treec79b56896a27f2a55be66f756c49d785f9eadbd0
parentcfcf5460b55c8f6245dd59e4531cd4b3b7abf114 (diff)
downloadgitlab-ce-user-dropdown-multiple-requests-fix.tar.gz
Stopped multiple requests with dropdownsuser-dropdown-multiple-requests-fix
Opening the user dropdown currently sends 2 requests. This has been changed so only one is sent Closes #24131
-rw-r--r--app/assets/javascripts/gl_dropdown.js2
-rw-r--r--changelogs/unreleased/user-dropdown-multiple-requests-fix.yml4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js
index 98e43c4d088..c016f25a7d3 100644
--- a/app/assets/javascripts/gl_dropdown.js
+++ b/app/assets/javascripts/gl_dropdown.js
@@ -249,7 +249,7 @@
_this.fullData = data;
_this.parseData(_this.fullData);
_this.focusTextInput();
- if (_this.options.filterable && _this.filter && _this.filter.input) {
+ if (_this.options.filterable && _this.filter && _this.filter.input && _this.filter.input.val().trim() !== '') {
return _this.filter.input.trigger('input');
}
};
diff --git a/changelogs/unreleased/user-dropdown-multiple-requests-fix.yml b/changelogs/unreleased/user-dropdown-multiple-requests-fix.yml
new file mode 100644
index 00000000000..a83441b852a
--- /dev/null
+++ b/changelogs/unreleased/user-dropdown-multiple-requests-fix.yml
@@ -0,0 +1,4 @@
+---
+title: Fixed multiple requests sent when opening dropdowns
+merge_request:
+author: