浏览代码

HUE-4463 [editor] Result column search on column types too

Enrico Berti 9 年之前
父节点
当前提交
1480fefc77

+ 1 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -80,7 +80,7 @@
         if (typeof item.originalIndex === 'undefined') {
           item.originalIndex = i;
         }
-        return item.name.toLowerCase().indexOf(self.metaFilter().toLowerCase()) > -1;
+        return item.name.toLowerCase().indexOf(self.metaFilter().toLowerCase()) > -1 || item.type.toLowerCase().indexOf(self.metaFilter().toLowerCase()) > -1;
       });
     });
 

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

@@ -1621,7 +1621,7 @@ ${ hueIcons.symbols() }
     <ul class="unstyled filtered-meta" data-bind="foreach: result.filteredMeta">
       <li data-bind="visible: name != ''">
         <input class="no-margin-top" type="checkbox" data-bind="event: { change: function(){ toggleColumn($element, $data.originalIndex, $parent);} }, checked: $data.checked" />
-        <a class="pointer" data-bind="text: $data.name, click: function(){ scrollToColumn($element, $data.originalIndex); }, attr: { title: $data.type + ' ' + '${ _('Click to scroll to data') }'}"></a>
+        <a class="pointer" data-bind="click: function(){ scrollToColumn($element, $data.originalIndex); }, attr: { title: '${ _ko('Click to scroll to data') }'}"><span data-bind="text: $data.name"></span> <span data-bind="text: $data.type" class="muted margin-left-20"></span></a>
       </li>
     </ul>
   </div>