Skip to content

Commit

Permalink
Fixed #2655
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Apr 30, 2017
1 parent e76a79c commit 5d78f3b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,10 @@ export class AutoComplete implements AfterViewInit,AfterViewChecked,ControlValue

handleDropdownClick(event) {
this.focusInput();
let queryValue = this.multiple ? this.multiInputEL.nativeElement.value : this.inputEL.nativeElement.value;
this.onDropdownClick.emit({
originalEvent: event,
query: this.inputEL.nativeElement.value
query: queryValue
});
}

Expand Down Expand Up @@ -464,7 +465,10 @@ export class AutoComplete implements AfterViewInit,AfterViewChecked,ControlValue
}

updateFilledState() {
this.filled = this.inputEL && this.inputEL.nativeElement && this.inputEL.nativeElement.value != '';
if(this.multiple)
this.filled = (this.value && this.value.length) || (this.multiInputEL && this.multiInputEL.nativeElement && this.multiInputEL.nativeElement.value != '');
else
this.filled = this.inputEL && this.inputEL.nativeElement && this.inputEL.nativeElement.value != '';
}

ngOnDestroy() {
Expand Down

0 comments on commit 5d78f3b

Please sign in to comment.