Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property [autofocus] not working on AutoComplete component #10232

Closed
funregis opened this issue May 12, 2021 · 1 comment
Closed

Property [autofocus] not working on AutoComplete component #10232

funregis opened this issue May 12, 2021 · 1 comment

Comments

@funregis
Copy link

funregis commented May 12, 2021

Hi,

When I use the Autocomplete stackblitz from primeng , and I set the property autofocus to true , the focus is not working

here an example with the autofocus property

https://stackblitz.com/edit/primeng-autocomplete-demo-faaeoh?file=src/app/app.component.html

Current behavior
The property [autofocus]="true" don't affect the focus of the autocomplete component

Expected behavior
When The property [autofocus]="true" then the focus is set on the autocomplete in the render view

What is the motivation / use case for changing the behavior?
Actually if you want to set the focus on the autocomplete component , you need to use a ViewChild and a "focusInput()" on the aucomplete retrieved by the viewchild , it makes difficult to share a common approach to handle the focus of every primeng input component

Please tell us about your environment:
IDE : Intellij , prineng 11.3.2 (also tested on 11.4.1)

  • Angular version: 11.2.10

  • PrimeNG version: 11.3.2 (also tested on 11.4.1)

  • Browser: [all ]

  • Language: [TypeScript 4.0.3 ]
@cetincakiroglu
Copy link
Contributor

Hi,

Since this problem occurs across many components, I'm closing this issue and merging them into one #11807. We'll fix them altogether.

Thanks for your support and report!

@cetincakiroglu cetincakiroglu removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants