-
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
Component: Dropdown - value that is not in the options is not displayed in the edit box after restart #14549
Comments
Hi, Unfortunately, I couldn't replicate it. Could you please attach a stackblitz link for us to replicate? Thanks a lot! |
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. |
I am doing this sharing for the first time, sorry if something did not work: There are three dropdowns. First two are initialised to a value existing in options and show the value ok. |
Hi, Your example does not start you can fork this example to create a new one https://stackblitz.com/edit/hqi4ek?file=package.json |
Here it is: https://stackblitz.com/edit/hqi4ek-aqswqg |
Hi, Thanks for the example, it seems that the issue has been fixed in v17.4.0 https://stackblitz.com/edit/hqi4ek-yzaslk?file=src%2Fapp%2Fdemo%2Fdropdown-basic-demo.ts,src%2Fapp%2Fdemo%2Fdropdown-basic-demo.html,package.json Closing the issue since it doesn't exist in v17.4.0, thanks a lot for reporting the issue! |
Describe the bug
The value entered in the editable field, if it is not among the selectable options, it is not displayed in the edit box when component is reinitialised. Also, if the dropdown is not editable, and the value is not among the options, it is not displayed. I am not sure if it should display that value, I think it should at least in case of editable dropdown. It may be a matter of initialising the editable box value to the current value.
Environment
Electron app
Reproducer
No response
Angular version
17.0.8
PrimeNG version
17.3.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
21.5.0
Browser(s)
Chrone
Steps to reproduce the behavior
Create a dialog with a dropdown with some options A, B, C and make it editable
Enter something D that is not A, B, C in the dropdown edit box, store the value and close dialog
Open the dialog - the D is displayed in the edit box
Reload the application and open the dialog - the edit box is empty, but value D is set in the runtime properly
Expected behavior
Value not in the options list should be displayed in the edit box and allow to be edited
The text was updated successfully, but these errors were encountered: