diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-02-10 19:44:42 +0300 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-02-13 20:10:15 +0300 |
commit | 17f5a34bfd7d122d1bdc8e11632ff072a89e9cbd (patch) | |
tree | f1d4b801b8d3fafc71026e287945acb349adf29f /app/assets/javascripts/gl_dropdown.js | |
parent | 4a9258371bf25ef0ce8687c3d7750d06b4337fe4 (diff) |
Display loading indicator when filtering ref switcher dropdown
Diffstat (limited to 'app/assets/javascripts/gl_dropdown.js')
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js index 77fa662892a..0d618caf350 100644 --- a/app/assets/javascripts/gl_dropdown.js +++ b/app/assets/javascripts/gl_dropdown.js @@ -47,9 +47,11 @@ } // Only filter asynchronously only if option remote is set if (this.options.remote) { + $inputContainer.parent().addClass('is-loading'); clearTimeout(timeout); return timeout = setTimeout(function() { return this.options.query(this.input.val(), function(data) { + $inputContainer.parent().removeClass('is-loading'); return this.options.callback(data); }.bind(this)); }.bind(this), 250); |