diff options
author | Phil Hughes <me@iamphill.com> | 2017-02-17 16:50:58 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-02-20 12:11:55 +0000 |
commit | 8cbf27af2b1efaf5bbe605c846ecc16b72ab7536 (patch) | |
tree | 4fed7654d3a6205b4ba42e827f32afeea1ba5931 | |
parent | dc303fe2dbc422b71e61897443741f78f0138e82 (diff) | |
download | gitlab-ce-8cbf27af2b1efaf5bbe605c846ecc16b72ab7536.tar.gz |
Changes when loading indicator is added to dropdown
Previously it was added when you started typing. But there is actually a delay before sending any requests which meant the loading icon was visible but it wasn't actually loading anything
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js index bf3da8528f0..f18711557bd 100644 --- a/app/assets/javascripts/gl_dropdown.js +++ b/app/assets/javascripts/gl_dropdown.js @@ -47,9 +47,10 @@ } // Only filter asynchronously only if option remote is set if (this.options.remote) { - $inputContainer.parent().addClass('is-loading'); clearTimeout(timeout); return timeout = setTimeout(function() { + $inputContainer.parent().addClass('is-loading'); + return this.options.query(this.input.val(), function(data) { $inputContainer.parent().removeClass('is-loading'); return this.options.callback(data); |