How to get autofocus on <p-autocomplete>

Components, Ajax Framework, Utilities and More.
Post Reply
dsparagna
Posts: 2
Joined: 31 Mar 2017, 20:55

20 Apr 2017, 22:59

<p-autoComplete [(ngModel)]="room" id="suggestSearch" (onSelect)="returnSelectedValue(room)" [suggestions]="filteredRoomsSingle"
(completeMethod)="filterRoomSingle($event)" field="room_name" [size]="40" placeholder="Room Name" [minLength]="1" autofocus>
</p-autoComplete>

Can't seem to figure out how to get autofocus on component load.

tandraschko
PrimeFaces Core Developer
Posts: 3118
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

21 Apr 2017, 09:52

Please use the PrimeNG forum.
Always Bet On Prime (+ Extensions)!

Thomas Andraschko
PrimeFaces Developer | PrimeFaces Extensions Founder
Apache OpenWebBeans PMC | Apache DeltaSpike PMC | Apache MyFaces PMC

Personal Blog: http://tandraschko.blogspot.de/

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests