primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Property [autofocus] not working on Dropdown component

Open pistage opened this issue 4 years ago • 1 comments

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"

pistage avatar Aug 05 '22 06:08 pistage

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!

cetincakiroglu avatar Aug 09 '22 10:08 cetincakiroglu