primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.23k stars 4.55k forks source link

Automplete: autoHighlight=true option no longer works in latest primeng version #15663

Open nevius opened 4 months ago

nevius commented 4 months ago

Describe the bug

I recently upgraded from primeng 16.1.0 to 17.17.0 Now, in the autocomplete component, autoHighlight=true no longer automatically selects the first element in the list of suggestions.

Environment

Angular app using primeng.

Reproducer

https://stackblitz.com/edit/4shexj?file=src%2Fapp%2Fautocomplete-objects-demo.html

Angular version

17.3.9

PrimeNG version

17.17.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.10.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Open StackBlitz example
  2. Type "United" into the text input

Expected behavior

Expected: "United Arab Emirates" suggestion is highlighted and can be selected by hitting Enter key. Actual: No suggestion is highlighted.

nevius commented 4 months ago

I just checked the code and it seems that this behavior is now controlled by the autoOptionFocus option. Maybe the documentation should be updated.

Petar-CV commented 2 months ago

Hm, we're having the same issue in one of our projects running PrimeNG 17.18.2 Did you manage to bypass it using autoOptionFocus? @nevius