Skip to content

Commit

Permalink
fixed #2037
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtcndkn committed Feb 10, 2017
1 parent 512a2b8 commit be5cc51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {NgModule,Component,ElementRef,AfterViewInit,AfterContentInit,AfterViewChecked,DoCheck,Input,Output,EventEmitter,ContentChildren,QueryList,TemplateRef,IterableDiffers,Renderer,forwardRef} from '@angular/core';
import {NgModule,Component,ViewChild,ElementRef,AfterViewInit,AfterContentInit,AfterViewChecked,DoCheck,Input,Output,EventEmitter,ContentChildren,QueryList,TemplateRef,IterableDiffers,Renderer,forwardRef} from '@angular/core';
import {CommonModule} from '@angular/common';
import {InputTextModule} from '../inputtext/inputtext';
import {ButtonModule} from '../button/button';
Expand Down Expand Up @@ -130,6 +130,8 @@ export class AutoComplete implements AfterViewInit,DoCheck,AfterViewChecked,Cont

filled: boolean;

@ViewChild('in') inputEL: ElementRef;

constructor(public el: ElementRef, public domHandler: DomHandler, differs: IterableDiffers, public renderer: Renderer) {
this.differ = differs.find([]).create(null);
}
Expand Down Expand Up @@ -411,6 +413,7 @@ export class AutoComplete implements AfterViewInit,DoCheck,AfterViewChecked,Cont

onDropdownFocus() {
this.dropdownFocus = true;
this.inputEL.nativeElement.focus();
}

onDropdownBlur() {
Expand Down

0 comments on commit be5cc51

Please sign in to comment.