Browse Source

KERNEL-3911 fix: 修复demo中搜索的结果没有对应的子节点的问题

es6
Kobi 5 years ago
parent
commit
1d72848b5a
  1. 10
      demo/js/west.js

10
demo/js/west.js

@ -38,6 +38,16 @@ Demo.West = BI.inherit(BI.Widget, {
onSearch: function (op, callback) {
var result = BI.Func.getSearchResult(Demo.CONFIG, op.keyword, "text");
var items = result.match.concat(result.find);
var children = [];
BI.each(items, function (index, item) {
var childList = BI.Func.getSearchResult(Demo.CONFIG, item.id, "pId");
BI.each(childList.match, function (index, child) {
if (child.value) {
children.push(child);
}
});
});
items = items.concat(children);
callback(items);
}
}],

Loading…
Cancel
Save