|
@@ -546,14 +546,19 @@ const showSelectTab = function(select, spread, afterShow) {
|
|
|
const cs = setting.customSearch.find(function (x) {return x.key === key});
|
|
|
return cs ? cs.check : null;
|
|
|
};
|
|
|
+ const getParantFun = function (key) {
|
|
|
+ const cs = setting.customSearch.find(function (x) {return x.key === key});
|
|
|
+ return cs && cs.parent !== undefined ? cs.parent : false;
|
|
|
+ };
|
|
|
const searchCustom = function (key) {
|
|
|
const keyword = $('#searchKeyword', obj).val();
|
|
|
const keyNum = _.toNumber(keyword);
|
|
|
const checkFun = getCheckFun(key);
|
|
|
searchResult = [];
|
|
|
const sortData = SpreadJsObj.getSortData(searchSheet);
|
|
|
+ const parantFun = getParantFun(key);
|
|
|
for (const node of sortData) {
|
|
|
- if (node.children && node.children.length > 0) continue;
|
|
|
+ if (node.children && node.children.length > 0 && !parantFun) continue;
|
|
|
if (checkFun && checkFun(node)) {
|
|
|
if (!keyword ||
|
|
|
(node.code && node.code.indexOf(keyword) > -1) ||
|