diff --git a/src/app/components/autocomplete/autocomplete.ts b/src/app/components/autocomplete/autocomplete.ts index 019ec3d2131..3417aee976f 100755 --- a/src/app/components/autocomplete/autocomplete.ts +++ b/src/app/components/autocomplete/autocomplete.ts @@ -605,7 +605,7 @@ export class AutoComplete implements AfterViewChecked,AfterContentInit,OnDestroy } onInputChange(event) { - if (this.forceSelection && this.suggestions) { + if (this.forceSelection) { let valid = false; let inputValue = event.target.value.trim(); @@ -744,6 +744,10 @@ export class AutoComplete implements AfterViewChecked,AfterContentInit,OnDestroy } ngOnDestroy() { + if (this.forceSelectionUpdateModelTimeout) { + clearTimeout(this.forceSelectionUpdateModelTimeout); + this.forceSelectionUpdateModelTimeout = null; + } this.restoreOverlayAppend(); this.onOverlayHide(); }