Browse Source

HUE-5150 [metadata] Don't do nav search on empty input

Johan Ahlen 9 years ago
parent
commit
5b0d9e8
1 changed files with 7 additions and 3 deletions
  1. 7 3
      desktop/core/src/desktop/templates/assist.mako

+ 7 - 3
desktop/core/src/desktop/templates/assist.mako

@@ -1481,12 +1481,16 @@ from metadata.conf import has_navigator
         % endif
 
         self.performSearch = function () {
-          if (!self.searchActive()) {
-            self.searchActive(true);
-          }
           if (self.searchInput() === lastQuery) {
             return;
           }
+          if (self.searchInput() === '') {
+            self.searchActive(false);
+            return;
+          }
+          if (!self.searchActive()) {
+            self.searchActive(true);
+          }
           if (self.searching()) {
             window.setTimeout(function() {
               self.performSearch();