Browse Source

HUE-5951 [assist] Close the assist search spinner on error

Johan Ahlen 8 years ago
parent
commit
372c133
1 changed files with 3 additions and 1 deletions
  1. 3 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 3 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -92,11 +92,12 @@
         }
       };
 
+      var spinThrottle = -1;
       var hideSpinner = function () {
+        window.clearTimeout(spinThrottle);
         $element.removeClass('input-spinner');
       };
 
-      var spinThrottle = -1;
       options = $.extend({
         addCount: false,
         closeOnEnter: true,
@@ -158,6 +159,7 @@
           },
           _renderMenu: function (ul, items) {
             var self = this;
+            hideSpinner();
             if (options.limitWidthToInput) {
               ul.css('max-width', Math.max(options.minWidth, $element.outerWidth(true)) + 'px');
             }