|
|
@ -45,10 +45,14 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, { |
|
|
|
_itemsCreator: function (options, callback) { |
|
|
|
_itemsCreator: function (options, callback) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var items = ITEMS; |
|
|
|
var items = ITEMS; |
|
|
|
|
|
|
|
var keywords = (options.keywords || []).slice(); |
|
|
|
if (options.keyword) { |
|
|
|
if (options.keyword) { |
|
|
|
var search = BI.Func.getSearchResult(items, options.keyword); |
|
|
|
keywords.push(options.keyword); |
|
|
|
items = search.matched.concat(search.finded); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
BI.each(keywords, function (i, kw) { |
|
|
|
|
|
|
|
var search = BI.Func.getSearchResult(items, kw); |
|
|
|
|
|
|
|
items = search.matched.concat(search.finded); |
|
|
|
|
|
|
|
}); |
|
|
|
if (options.selected_values) {//过滤
|
|
|
|
if (options.selected_values) {//过滤
|
|
|
|
var filter = BI.makeObject(options.selected_values, true); |
|
|
|
var filter = BI.makeObject(options.selected_values, true); |
|
|
|
items = BI.filter(items, function (i, ob) { |
|
|
|
items = BI.filter(items, function (i, ob) { |
|
|
|