瀏覽代碼

HUE-5847 [autocomplete] Hide the autocomplete dropdown when there are no matches after typing

Johan Ahlen 8 年之前
父節點
當前提交
6d098a8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/notebook/src/notebook/templates/hue_ace_autocompleter.mako

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/hue_ace_autocompleter.mako

@@ -21,7 +21,7 @@ from desktop.views import _ko
 
 <%def name="hueAceAutocompleter()">
   <script type="text/html" id="hue-ace-autocompleter">
-    <!-- ko if: active -->
+    <!-- ko if: active() && suggestions.filtered().length !== 0 -->
     <div class="hue-ace-autocompleter" data-bind="style: { top: top() + 'px', left: left() + 'px' }">
       <div class="autocompleter-suggestions">
         <!-- ko if: suggestions.availableCategories().length > 1 || suggestions.loading() -->