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

Component: Autocomplete with updateOn blur #16805

Open
SpeederX opened this issue Nov 21, 2024 · 1 comment
Open

Component: Autocomplete with updateOn blur #16805

SpeederX opened this issue Nov 21, 2024 · 1 comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Milestone

Comments

@SpeederX
Copy link

SpeederX commented Nov 21, 2024

Describe the bug

When you setup the autocomplete with the updateOn: "blur" as value change event of the FormControl, the input will be updated only after the first selection happens, but the value will always have the last selected value by the user.
Due to how the event of blur is handled in the , this doesn't make it consistent with the logic.

The stackblitz is the one on the example page with virtual scroll, so I forked that one.

I add an additional comment as we found this bug during an integration of the component into our existing webapp. If you're ok with it I can provide already some insight on how we handled it and I think might work out to solve this kind of behavior. Are open contribution doable via fork + pr? ( new here )

Environment

Windows, Chrome

Reproducer

https://stackblitz.com/edit/fysj2c?file=src%2Fapp%2Fautocomplete-virtual-scroll-demo.html

Angular version

17.3.8-11

PrimeNG version

17.18.11-2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.0

Browser(s)

Chrome 131

Steps to reproduce the behavior

  1. Click on the input of the autocomplete
  2. Select one option
  3. Suggestions will close and once again, click on the input of the autocomplete
  4. Select one option

Expected behavior

When a user Select the option, the autocomplete should set the value to the form accordingly

@SpeederX SpeederX added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 21, 2024
@mertsincan mertsincan added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 22, 2024
@mertsincan mertsincan added this to the Future milestone Nov 22, 2024
Copy link

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
None yet
Development

No branches or pull requests

2 participants