浏览代码

HUE-7321 [frontend] Close the global search results on show in assist

Johan Ahlen 8 年之前
父节点
当前提交
3b258ab
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      desktop/core/src/desktop/templates/ko_components.mako

+ 8 - 0
desktop/core/src/desktop/templates/ko_components.mako

@@ -686,6 +686,14 @@ from desktop.views import _ko
           }
         });
 
+        huePubSub.subscribe('context.popover.show.in.assist', function () {
+          window.setTimeout(function () {
+            if (self.searchResultVisible()) {
+              self.close();
+            }
+          }, 0);
+        });
+
         self.searchInput.subscribe(function (newValue) {
           if (self.inlineAutocomplete().indexOf(newValue) !== 0 || newValue === '') {
             self.inlineAutocomplete(newValue);