How to get autofocus on <p-autocomplete>

UI Components for JSF
Post Reply
Posts: 3
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>

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

PrimeFaces Core Developer
Posts: 3376
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE

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:

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests