@ -74,7 +74,7 @@ export class MultiSelectInnerLoader extends Widget {
this . next . setLoaded ( ) ;
this . next . setLoaded ( ) ;
const items = this . _composeItems ( this . cachItems . slice ( 0 , 100 ) ) ;
const items = this . _composeItems ( this . cachItems . slice ( 0 , 100 ) ) ;
this . cachItems = this . cachItems . slice ( 100 ) ;
this . cachItems = this . cachItems . slice ( 100 ) ;
this . addItems ( items ) ;
this . addItems ( items , true ) ;
return ;
return ;
}
}
@ -183,7 +183,7 @@ export class MultiSelectInnerLoader extends Widget {
] ) ;
] ) ;
}
}
addItems ( items ) {
addItems ( items , isFromCache = false ) {
this . count += items . length ;
this . count += items . length ;
if ( isObject ( this . next ) ) {
if ( isObject ( this . next ) ) {
if ( this . hasNext ( ) ) {
if ( this . hasNext ( ) ) {
@ -194,7 +194,7 @@ export class MultiSelectInnerLoader extends Widget {
}
}
}
}
// cacheGroup渲染的是全量的,如果这次加载更多add的items是从cacheItems里面拿的,那不用再add了
// cacheGroup渲染的是全量的,如果这次加载更多add的items是从cacheItems里面拿的,那不用再add了
if ( this . cachItems . length > 0 ) {
if ( isFromCache ) {
this . button _group . addItems ( ... arguments ) ;
this . button _group . addItems ( ... arguments ) ;
return ;
return ;
}
}