@@ -115,8 +115,6 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
115115
116116 private _collapsing = false ;
117117
118- private _previousSelection = { selectedItem : '' , selection : [ ] } ;
119-
120118 /** @hidden @internal */
121119 public get filteredData ( ) : any [ ] | null {
122120 return this . _filteredData ;
@@ -281,9 +279,6 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
281279
282280 /** @hidden @internal */
283281 public override handleInputChange ( event ?: any ) : void {
284- if ( this . hasSelectedItem ) {
285- this . _previousSelection = { selectedItem : this . selectedItem , selection : this . selection } ;
286- }
287282 if ( event !== undefined ) {
288283 this . filterValue = this . searchValue = typeof event === 'string' ? event : event . target . value ;
289284 }
@@ -297,7 +292,7 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
297292 this . filterValue = '' ;
298293 }
299294 if ( super . selection . length ) {
300- this . selectionService . clear ( this . id ) ;
295+ this . clearSelection ( ) ;
301296 }
302297 // when filtering the focused item should be the first item or the currently selected item
303298 if ( ! this . dropdown . focusedItem || this . dropdown . focusedItem . id !== this . dropdown . items [ 0 ] . id ) {
@@ -471,10 +466,6 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
471466 } ;
472467 if ( args . newSelection !== args . oldSelection ) {
473468 this . selectionChanging . emit ( args ) ;
474- } else if ( this . _updateInput && newSelection . size === 0 && this . _previousSelection . selectedItem !== '' ) {
475- args . oldValue = this . _previousSelection . selectedItem ;
476- args . oldSelection = this . _previousSelection . selection ;
477- this . selectionChanging . emit ( args ) ;
478469 }
479470 // TODO: refactor below code as it sets the selection and the display text
480471 if ( ! args . cancel ) {
@@ -493,13 +484,7 @@ export class IgxSimpleComboComponent extends IgxComboBaseDirective implements Co
493484 this . _updateInput = true ;
494485 } else if ( this . isRemote ) {
495486 this . registerRemoteEntries ( newValueAsArray , false ) ;
496- } else if ( args . cancel ) {
497- if ( this . _updateInput && this . _previousSelection . selectedItem !== '' ) {
498- this . selectionService . select_items ( this . id , [ this . _previousSelection . selectedItem ] , true ) ;
499- this . _value = [ this . _previousSelection . selectedItem ] ;
500- }
501487 }
502- this . _previousSelection = { selectedItem : '' , selection : [ ] } ;
503488 }
504489
505490 protected createDisplayText ( newSelection : any [ ] , oldSelection : any [ ] ) : string {
0 commit comments