Explorar o código

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

Johan Ahlen %!s(int64=8) %!d(string=hai) anos
pai
achega
3b258ab1b9
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  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);