-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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: Preselected value not shown when using reactive forms #14241
Comments
@Timmeeeey same issue here |
@Timmeeeey another thing, if you remove |
I have the same problem PrimeNg 17.0.0-rc.1 = not OK PrimeNg 17.0.0-beta.1 = not OK PrimeNg 16.9.1 with Angular 17 = not OK PrimeNg 16.9.1 with Angular 16 = OK |
@cetincakiroglu any updates on this? did you check reproducers? |
@cetincakiroglu tested with latest version |
Thanks for the reproducer, we'll check and identify the issue. |
I have the same issue. Last 2 days I tried to debug it, and finally found this thread :) The only "workaround" that I found to bind the value into the ngModel as well. But it is definitely a breaking change that the Angular 17 brought. |
Fixed #14241 - Dropdown | Preselected value not shown when using reac…
@cetincakiroglu this should be reopened, since issue is still there even with 17.1.0 fix |
I'm going to try it soon with the new version. But yes, in the release notes this fix is there. |
Are you sure? Your example is working actually, I didn't change anything just opened the example you've shared above. |
Check the error in console |
It's another issue, I'll create a new issue for it, thanks a lot for reporting |
@cetincakiroglu ok thats fine |
I still have occasional instances of the pre-selected item not showing up, however, its not trivial to reproduce. |
the problem seems to happen when initially the list of options if |
The filterBy option is not working... |
I've found a crazy work around... if you add virtual scroll to the component then it works! |
found a better hack!
seems to need to set value to an empty string first otherwise it doesn't work... so very strange... it is like the dropdown isn't updating its on screen paint once everything has completed... maybe a zone file bug in angular or a weird bug in primeng dropdown... |
https://stackblitz.com/edit/xdzkrc In the above example, using Float Label primeng : v17.14.1 |
Describe the bug
When using reactive forms with an initial value this value is not shown in the dropdown.
It shows only after clicking on the dropdown.
Environment
Windows, Edge
Reproducer
https://stackblitz.com/edit/z2vojt
Angular version
17.0.0
PrimeNG version
17.0.0-beta.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.9.0
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: