-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Autocomplete: Down/Up arrows trigger (onSelect) event when [autoHighlight]="true" #15208
Comments
@ninjavis I will start work on this |
Is this fix can support Primeng Version 16.9.1? Issue is same: if we are making AutoHighlight as false, On Down arrow, system is not showing the highlighted one. |
Bug #15208 - Autocomplete: Down/Up arrows trigger (onSelect) event when [autoHighlight]="true"
Thank you! |
I don't know the cause but my issue not worked with this updated version. I fixed my issue like this; HTML
TS
|
Describe the bug
As the title indicates, the arrow buttons no longer work for selecting an autocomplete option. It immediately triggers the (onSelect) event when [autoHighlight]="true".
The below code works:
The code below does not:
Environment
Win 11
Angular CLI: 17.3.2
Node: 18.16.1
Package Manager: npm 9.5.1
OS: win32 x64
Angular: 17.3.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.1703.2
@angular-devkit/build-angular 17.3.2
@angular-devkit/core 17.3.2
@angular-devkit/schematics 17.3.2
@angular/cdk 13.3.4
@angular/cli 17.3.2
@schematics/angular 17.3.2
rxjs 7.8.1
typescript 5.4.3
zone.js 0.14.4
primeng 17.12.0
Reproducer
https://stackblitz.com/edit/hzfsyn?file=src%2Fapp%2Fdemo%2Fautocomplete-reactive-forms-demo.ts,src%2Fapp%2Fdemo%2Fautocomplete-reactive-forms-demo.html
Angular version
17.3.2
PrimeNG version
17.12.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.16.1
Browser(s)
Opera One 108.0.5067.29
Steps to reproduce the behavior
As described, merely add [autoHighlight]="true" to the p-autoComplete component.
Search for autocomplete suggestions.
Press the down arrow on the keyboard to try and select an option.
You'll see that the (onSelect) event fires, which it shouldn't, because this event is often used for POST/PATCH API calls.
Expected behavior
The arrow buttons should not trigger the p-autoComplete (onSelect) event.
The text was updated successfully, but these errors were encountered: