Commit 01e5189e authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'dropdown-loading-class-add' into 'master'

Changes when loading indicator is added to dropdown

See merge request !9345
parents b596dd8f 3c20a647
...@@ -47,9 +47,10 @@ ...@@ -47,9 +47,10 @@
} }
// Only filter asynchronously only if option remote is set // Only filter asynchronously only if option remote is set
if (this.options.remote) { if (this.options.remote) {
$inputContainer.parent().addClass('is-loading');
clearTimeout(timeout); clearTimeout(timeout);
return timeout = setTimeout(function() { return timeout = setTimeout(function() {
$inputContainer.parent().addClass('is-loading');
return this.options.query(this.input.val(), function(data) { return this.options.query(this.input.val(), function(data) {
$inputContainer.parent().removeClass('is-loading'); $inputContainer.parent().removeClass('is-loading');
return this.options.callback(data); return this.options.callback(data);
......
...@@ -20,6 +20,8 @@ feature 'Ref switcher', feature: true, js: true do ...@@ -20,6 +20,8 @@ feature 'Ref switcher', feature: true, js: true do
input.set 'binary' input.set 'binary'
wait_for_ajax wait_for_ajax
expect(find('.dropdown-content ul')).to have_selector('li', count: 6)
page.within '.dropdown-content ul' do page.within '.dropdown-content ul' do
input.native.send_keys :enter input.native.send_keys :enter
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment