|
|
@ -80,7 +80,7 @@ export class MultiSelectInnerLoader extends Widget { |
|
|
|
} |
|
|
|
} |
|
|
|
o.itemsCreator.apply(this, [ |
|
|
|
o.itemsCreator.apply(this, [ |
|
|
|
{ times: ++this.times }, |
|
|
|
{ times: ++this.times }, |
|
|
|
function () { |
|
|
|
function() { |
|
|
|
self.next.setLoaded(); |
|
|
|
self.next.setLoaded(); |
|
|
|
self.addItems(...arguments); |
|
|
|
self.addItems(...arguments); |
|
|
|
} |
|
|
|
} |
|
|
@ -105,7 +105,7 @@ export class MultiSelectInnerLoader extends Widget { |
|
|
|
], |
|
|
|
], |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.button_group.on(Controller.EVENT_CHANGE, function (type, value, obj) { |
|
|
|
this.button_group.on(Controller.EVENT_CHANGE, function(type, value, obj) { |
|
|
|
if (type === Events.CLICK) { |
|
|
|
if (type === Events.CLICK) { |
|
|
|
const node = self.cachGroup.getNodeByValue(value); |
|
|
|
const node = self.cachGroup.getNodeByValue(value); |
|
|
|
if (node) { |
|
|
|
if (node) { |
|
|
@ -158,12 +158,12 @@ export class MultiSelectInnerLoader extends Widget { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
o.isDefaultInit && |
|
|
|
o.isDefaultInit && |
|
|
|
isEmpty(o.items) && |
|
|
|
isEmpty(o.items) && |
|
|
|
nextTick( |
|
|
|
nextTick( |
|
|
|
bind(function () { |
|
|
|
bind(function() { |
|
|
|
o.isDefaultInit && isEmpty(o.items) && this._populate(); |
|
|
|
o.isDefaultInit && isEmpty(o.items) && this._populate(); |
|
|
|
}, this) |
|
|
|
}, this) |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
hasNext() { |
|
|
|
hasNext() { |
|
|
@ -221,7 +221,7 @@ export class MultiSelectInnerLoader extends Widget { |
|
|
|
if (arguments.length === 0 && isFunction(o.itemsCreator)) { |
|
|
|
if (arguments.length === 0 && isFunction(o.itemsCreator)) { |
|
|
|
o.itemsCreator.apply(this, [ |
|
|
|
o.itemsCreator.apply(this, [ |
|
|
|
{ times: 1 }, |
|
|
|
{ times: 1 }, |
|
|
|
function (items, keyword) { |
|
|
|
function(items, keyword) { |
|
|
|
if (arguments.length === 0) { |
|
|
|
if (arguments.length === 0) { |
|
|
|
throw new Error("object already registered"); |
|
|
|
throw new Error("object already registered"); |
|
|
|
} |
|
|
|
} |
|
|
@ -289,11 +289,11 @@ export class MultiSelectInnerLoader extends Widget { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getAllButtons() { |
|
|
|
getAllButtons() { |
|
|
|
return this.button_group.getAllButtons(); |
|
|
|
return this.cachGroup.getAllButtons(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getAllLeaves() { |
|
|
|
getAllLeaves() { |
|
|
|
return this.button_group.getAllLeaves(); |
|
|
|
return this.cachGroup.getAllLeaves(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getSelectedButtons() { |
|
|
|
getSelectedButtons() { |
|
|
|