@@ -218,7 +218,7 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
218218 */
219219 ngOnChanges ( changes ) {
220220 if ( changes . items ) {
221- this . view [ "updateList" ] ( changes . items . currentValue ) ;
221+ this . view . items = changes . items . currentValue ;
222222 this . updateSelected ( ) ;
223223 }
224224 }
@@ -254,9 +254,9 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
254254 this . closeDropdown ( ) ;
255255 }
256256 this . selected . emit ( event ) ;
257- this . view [ " filterBy" ] ( "" ) ;
257+ this . view . filterBy ( "" ) ;
258258 } ) ;
259- this . view [ "updateList" ] ( this . items ) ;
259+ this . view . items = this . items ;
260260 // update the rest of combobox with any pre-selected items
261261 // setTimeout just defers the call to the next check cycle
262262 setTimeout ( ( ) => {
@@ -293,7 +293,7 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
293293 setTimeout ( ( ) => this . view . getCurrentElement ( ) . focus ( ) , 0 ) ;
294294 } else if ( ( ev . key === "ArrowUp" || ev . key === "Up" ) // `"Up"` is IE specific value
295295 && this . dropdownMenu . nativeElement . contains ( ev . target )
296- && ! this . view [ " hasPrevElement" ] ( ) ) {
296+ && ! this . view . hasPrevElement ( ) ) {
297297 this . elementRef . nativeElement . querySelector ( ".bx--text-input" ) . focus ( ) ;
298298 }
299299 }
@@ -343,7 +343,7 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
343343 }
344344 return item ;
345345 } ) ;
346- this . view [ "updateList" ] ( this . items ) ;
346+ this . view . items = this . items ;
347347 this . updatePills ( ) ;
348348 // clearSelected can only fire on type=multi
349349 // so we just emit getSelected() (just in case there's any disabled but selected items)
@@ -381,7 +381,7 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
381381 * @param {string } searchString
382382 */
383383 public onSearch ( searchString ) {
384- this . view [ " filterBy" ] ( searchString ) ;
384+ this . view . filterBy ( searchString ) ;
385385 if ( searchString !== "" ) {
386386 this . openDropdown ( ) ;
387387 } else {
@@ -390,7 +390,7 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
390390 if ( this . type === "single" ) {
391391 // deselect if the input doesn't match the content
392392 // of any given item
393- const matches = this . view . items . some ( item => item . content . toLowerCase ( ) . includes ( searchString . toLowerCase ( ) ) ) ;
393+ const matches = this . view . getListItems ( ) . some ( item => item . content . toLowerCase ( ) . includes ( searchString . toLowerCase ( ) ) ) ;
394394 if ( ! matches ) {
395395 const selected = this . view . getSelected ( ) ;
396396 if ( selected ) {
@@ -399,7 +399,7 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
399399 this . view . select . emit ( { item : selected [ 0 ] } ) ;
400400 this . propagateChangeCallback ( null ) ;
401401 } else {
402- this . view [ " filterBy" ] ( "" ) ;
402+ this . view . filterBy ( "" ) ;
403403 }
404404 }
405405 }
@@ -421,10 +421,10 @@ export class ComboBox implements OnChanges, OnInit, AfterViewInit, AfterContentI
421421 public onSubmit ( ev ) {
422422 let index = 0 ;
423423 if ( ev . after ) {
424- index = this . view . items . indexOf ( ev . after ) + 1 ;
424+ index = this . view . getListItems ( ) . indexOf ( ev . after ) + 1 ;
425425 }
426426 this . submit . emit ( {
427- items : this . view . items ,
427+ items : this . view . getListItems ( ) ,
428428 index,
429429 value : {
430430 content : ev . value ,
0 commit comments