diff --git a/changelog.md b/changelog.md index fd2f41750..6bbed0565 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-08) +- 修复了searcher在允许搜索的情况下输入空格直接退出搜索的问题 - 修复了复选下拉系列'点按空格添加完全匹配项'添加的是显示值而非实际值的问题 - search_text_value_combo支持水印 - BI.makeObject 方法支持传入iteratee diff --git a/src/base/combination/searcher.js b/src/base/combination/searcher.js index b7b307e55..3a8891acf 100644 --- a/src/base/combination/searcher.js +++ b/src/base/combination/searcher.js @@ -80,7 +80,10 @@ BI.Searcher = BI.inherit(BI.Widget, { search(); break; case BI.Events.PAUSE: - self._pauseSearch(); + // 可以搜索空格的情况下输入空格不做处理, 展示上一次的结果 + if (!o.allowSearchBlank) { + self._pauseSearch(); + } break; } }); diff --git a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js index ff62ef243..edf3cb5ae 100644 --- a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js @@ -44,7 +44,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { var keyword = obj.keyword; var finding = BI.Func.getSearchResult(o.items, keyword); var matched = finding.match, find = finding.find; - callback(find, matched); + callback(matched, find); }, listeners: [{ eventName: BI.Searcher.EVENT_CHANGE,