From 1d72848b5a2196176fe0d631ec635fbe840f443b Mon Sep 17 00:00:00 2001 From: Kobi Date: Fri, 24 Apr 2020 14:02:06 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-3911=20fix:=20=E4=BF=AE=E5=A4=8Ddemo?= =?UTF-8?q?=E4=B8=AD=E6=90=9C=E7=B4=A2=E7=9A=84=E7=BB=93=E6=9E=9C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=AF=B9=E5=BA=94=E7=9A=84=E5=AD=90=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/west.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/demo/js/west.js b/demo/js/west.js index 2c68f3795f..4391ba9c3d 100644 --- a/demo/js/west.js +++ b/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); } }],