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

Placeholder text shows with the initial value of the dropdown #14219

Closed
twmobius opened this issue Nov 27, 2023 · 3 comments
Closed

Placeholder text shows with the initial value of the dropdown #14219

twmobius opened this issue Nov 27, 2023 · 3 comments
Assignees
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team

Comments

@twmobius
Copy link

twmobius commented Nov 27, 2023

Describe the bug

I think this is related to #14094. I am getting at a state where both the p-dropdown placeholder and the initial value in a reactive form component are both shown at the same time.

As seen in the screenshot here:

CleanShot 2023-11-28 at 00 11 59

I think it happens because the options are being lazy loaded and the form is patchValue()d before the options are being populated. Something related to the label() method perhaps (https://github.com/primefaces/primeng/blob/master/src/app/components/dropdown/dropdown.ts#L918C1-L922C8)

Environment

I've tried it with primeng 16.6.0 and 16.7.2, and it doesn't happen

Reproducer

https://stackblitz.com/edit/qxhoel-3xpawg

Angular version

16.2.12

PrimeNG version

16.8.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.16.1

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@twmobius twmobius 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 27, 2023
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working 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 28, 2023
@cetincakiroglu cetincakiroglu self-assigned this Nov 28, 2023
@cetincakiroglu cetincakiroglu added this to the 17.0.0-rc.1 milestone Nov 28, 2023
@cetincakiroglu
Copy link
Contributor

Hi,

Couldn't replicate the behavior in the latest PrimeNG, it may have fixed within 16.9 and 17.0.0-beta.1. Please see the working example: https://stackblitz.com/edit/u9wypz?file=src%2Fapp%2Fdemo%2Fdropdown-reactive-forms-demo.ts,src%2Fapp%2Fdemo%2Fdropdown-reactive-forms-demo.html

@cetincakiroglu cetincakiroglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Nov 28, 2023
Copy link

We're unable to replicate your issue, if you are able to create a reproducer by using PrimeNG Issue Template or add details please edit this issue. This issue will be closed if no activities in 20 days.

@twmobius
Copy link
Author

I can verify that it works as expected on 16.9.0, I've updated by stackblitz to 16.9.0 and it works.

@cetincakiroglu cetincakiroglu removed this from the 17.0.0-rc.1 milestone Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team
Projects
None yet
Development

No branches or pull requests

2 participants