@ -78,6 +78,11 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
self . _setStartValue ( "" ) ;
self . _setStartValue ( "" ) ;
self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _STOP ) ;
self . fireEvent ( BI . MultiSelectNoBarCombo . EVENT _STOP ) ;
} ) ;
} ) ;
this . trigger . on ( BI . MultiSelectTrigger . EVENT _PAUSE , function ( ) {
if ( this . getSearcher ( ) . hasMatched ( ) ) {
self . _addItem ( assertShowValue ) ;
}
} ) ;
this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( keywords ) {
this . trigger . on ( BI . MultiSelectTrigger . EVENT _SEARCHING , function ( keywords ) {
var last = BI . last ( keywords ) ;
var last = BI . last ( keywords ) ;
@ -272,6 +277,25 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
} ) ;
} ) ;
} ,
} ,
_addItem : function ( assertShowValue ) {
var self = this ;
var keyword = this . trigger . getSearcher ( ) . getKeyword ( ) ;
this . _join ( {
type : BI . Selection . Multi ,
value : [ keyword ]
} , function ( ) {
// 如果在不选的状态下直接把该值添加进来
if ( self . storeValue . type === BI . Selection . Multi ) {
BI . pushDistinct ( self . storeValue . value , keyword ) ;
}
self . combo . setValue ( self . storeValue ) ;
self . _setStartValue ( keyword ) ;
assertShowValue ( ) ;
self . populate ( ) ;
self . _setStartValue ( "" ) ;
} ) ;
} ,
_itemsCreator4Trigger : function ( op , callback ) {
_itemsCreator4Trigger : function ( op , callback ) {
var self = this , o = this . options ;
var self = this , o = this . options ;
o . itemsCreator ( op , function ( res ) {
o . itemsCreator ( op , function ( res ) {