Property [autofocus] not working on Dropdown component
Describe the bug
This is related to #10232. Autofocus do not have any effect.
Environment
OS: darwin arm64
Reproducer
https://stackblitz.com/edit/github-1ovwbf?file=src/app/app.component.html
Angular version
14.0.7
PrimeNG version
14.0.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.13.1
Browser(s)
No response
Steps to reproduce the behavior
<p-dropdown [options]="cities" [(ngModel)]="selectedCity" placeholder="Select a City" [autofocus]="true"></p-dropdown>
<p-dropdown [options]="cities" [(ngModel)]="selectedCity" placeholder="Select a City" [autofocus]="false"></p-dropdown>
Autofocus does not have any effect on the dropdown, no matter of values.
Expected behavior
Autofocus should focus the dropdown on load when having the attribute [autofocus]="true"
Hi,
Since this problem occurs across many components, I'm closing this issue and merging them into one https://github.com/primefaces/primeng/issues/11807. We'll fix them altogether.
Thanks for your support and report!