How to get autofocus on <p-autocomplete>

UI Components for JSF
Post Reply
dsparagna
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>
</p-autoComplete>

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

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

21 Apr 2017, 09:52

Please use the PrimeNG forum.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 67 guests