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

Dropdown: Missing placeholder triggers unexpected ngModelChange #15340

Closed
stanislavKacmarik opened this issue Apr 23, 2024 · 1 comment
Closed
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@stanislavKacmarik
Copy link

stanislavKacmarik commented Apr 23, 2024

Describe the bug

p-dropdown behaves non consistent - when attribute placeholder is present, then ngModelChange is not triggered during its initalization, but its triggered when placeholder is missing (or its value is empty string).
Even when value bound for ngModel is changed automatically from code, p-dropdown without placeholder will trigger ngModelChange, but p-dropdown with placeholder is not triggering ngModelChange. In provided demo this change occurs after 5 seconds after component initialization.

Environment

17.14.1

Reproducer

https://stackblitz.com/edit/rsoiam-gmp8s3?file=src%2Fapp%2Fdemo%2Fdropdown-basic-demo.html

Angular version

17.3.1

PrimeNG version

17.14.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v18.16.0

Browser(s)

Chrome 124

Steps to reproduce the behavior

Create 1 p-dropdown with placeholder and another without and compare differences when ngModelChange is triggered. After that, automatically update value, and see differences between dropdown with and without placeholder

Expected behavior

Absence of placeholder should not have any effects to ngModelChange, or at least this behavior should be documented

@stanislavKacmarik stanislavKacmarik added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 23, 2024
@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants