-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: default optionLabel and default optionValue are null (but doc say, default to label and value) #4174
Comments
Thanks a lot for the report! We'll check it. |
Hi, thanks. But, I am wondering If the commit is the only one that fixes this bug, it may not be sufficient. To be consistent with this part of documentation : "Dropdown is used as a controlled component with v-model property along with an options collection. Label and value of an option are defined with the optionLabel and optionValue properties respectively. Default property name for the optionLabel is label and value for the optionValue. If optionValue is omitted and the object has no value property, the object itself becomes the value of an option. Note that, when options are simple primitive values such as a string array, no optionLabel and optionValue would be necessary." optionLabel should have the following default value: 'label' Did I miss something? Thx |
@deguich I am seeing the same thing, so I took a look at the source for dropdown and it appears things aren't working as documented... and it appears to be a pattern across lots of other selection-based controls. Working on a fix but it might be a bit. |
Could you re-open this issue ? |
@deguich @mertsincan PR opened to fix this issue: #4340. Please review at earliest convenience. This is a blocker for my project and I will be referencing the fork until this is pulled in! If I am missing anything such as a test scenario or documentation update, etc, please also let me know so I can address. Thanks! |
Sorry for the confusion. Documentation will be fixed. |
Hi, |
Hi, |
Describe the bug
When using a simple dropdown with data like :
This dropdown should show a list of labels, it shows the objects list :
Reproducer
https://codesandbox.io/p/sandbox/condescending-tu-n5pvck
PrimeVue version
3.30.2
Vue version
3.x
Language
TypeScript
Build / Runtime
Vite
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: