Skip to content
Snippets Groups Projects
Commit 8cbf27af authored by Phil Hughes's avatar Phil Hughes
Browse files

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
parent dc303fe2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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);
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment