AutoFocus

AutoFocus manages focus on focusable element on load.


import { AutoFocusModule } from 'primeng/autofocus';

AutoFocus is applied to any focusable input element on initial load. It's disabled by default and needs to be enabled manually.


<input 
    type="text" 
    pInputText
    pAutoFocus 
    [autofocus]="true" 
    placeholder="Automatically focused" />