Skip to content

Commit

Permalink
Fixed #8511 - Autocomplete doesn't clear input value if user tabs bef…
Browse files Browse the repository at this point in the history
…ore suggestions are displayed
  • Loading branch information
cagataycivici committed Mar 19, 2020
1 parent baaa258 commit f8c37e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit f8c37e1

Please sign in to comment.