-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
fix(VCombobox): placeholder visibility for empty string value #22022
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
base: master
Are you sure you want to change the base?
fix(VCombobox): placeholder visibility for empty string value #22022
Conversation
142b234
to
bb54746
Compare
3c9b2e3
to
ebdc1c8
Compare
8ed72c6
to
a19aa97
Compare
a19aa97
to
e62bf0b
Compare
Done with the update as per your review Jacek let me know if you still have review points thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Green light from me, but I wish others could have a day or two to voice their opinions. @vuetifyjs/core-team
Is there anywhere else in the framework where we parse or otherwise try to do something special when dealing with "empty" values? Are there any performance implication for building 2 more computed arrays? |
props, | ||
'modelValue', | ||
[], | ||
v => transformIn(wrapInArray(v)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change necessary? Combobox only works with returnObject so modelValue=null will never match any item unless they're doing something weird with the slots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, after careful investigation, it seems to be not needed. During my investigation it seems that the emptyValues
are not properly set on final render thus the placeholder not being shown properly will further investigate this thanks! EDIT: I updated the code and the fix seems to be working fine.
this doesn't affect any other components, is that still a problem elsewhere? |
They are overlaping, but could go together. The old #20742 is stuck a bit because, VSelect and VAutocomplete require more testing and I have dropped the ball. My concern is about VCombobox is simplere and could be fixed separately/first with this PR - it would be a step forward. #20742 can stay open. |
It should be, it's called in the computed getter in proxiedModel |
👍🏼 confirmed as working, shows Empty when the item is pushed with delay setTimeout(() => {
options1.value.push({ title: 'Empty', value: '' })
}, 2000) That PR still needs some good testing. Assuming it gets done, we can consolidate both PRs. |
Description
fixes #21972
Markup: