-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
fix(VAutocomplete): divider/subheader not rendering #19912
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx # packages/vuetify/src/components/VCombobox/VCombobox.tsx # packages/vuetify/src/components/VSelect/VSelect.tsx
Known issues for now are:
|
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.
i don't know why this was deleted in the first place. MAybe @nekosaur can say something about that.
@yuwu9145 @johnleider @KaelWD |
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.
What is the reasoning from switching from InternalListItem to ListItem?
@@ -294,13 +294,13 @@ export const VListItem = genericComponent<VListItemSlots>()({ | |||
)} | |||
|
|||
<div class="v-list-item__content" data-no-activator=""> | |||
{ hasTitle && ( | |||
{ hasTitle && !slots.default && ( |
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.
What is the reason for this change?
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.
Actually. I have no real clue. This is something I just copied over from the other PR. It came with this commit, which I think is not really related to this change: e6792c1
If it is not needed or is bad practice, I will remove it.
<VListItemTitle key="title"> | ||
{ slots.title?.({ title: props.title }) ?? props.title } | ||
</VListItemTitle> | ||
)} | ||
|
||
{ hasSubtitle && ( | ||
{ hasSubtitle && !slots.default && ( |
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.
What is the reason for this change?
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.
Actually. I have no real clue. This is something I just copied over from the other PR. It came with this commit, which I think is not really related to this change: e6792c1
If it is not needed or is bad practice, I will remove it.
@nekosaur Would love for you to chip in on some of those review comments/question, if you can :) |
This is a superflous change from the original PR vuetifyjs@6d6c1dc.
I think that the |
@@ -87,7 +88,9 @@ export const makeSelectProps = propsFactory({ | |||
openOnClear: Boolean, | |||
itemColor: String, | |||
|
|||
...makeItemsProps({ itemChildren: false }), | |||
...makeItemsProps({ | |||
itemProps: () => (item: any) => ({ subheader: item.subheader, divider: item.divider }), |
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.
I tested the branch with the provided markup and the dividers are missing for the VSelect (and VAutocomplete). It seems like this is expecting subheader
and divider
to be at the root, but it is not the case.
Looking into item.props?.subheader
works. It also works like that:
itemProps: () => (item: any) => ({ subheader: item.subheader, divider: item.divider }), | |
itemProps: 'props', |
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.
Unless the markup you provided is not the good one @func0der ? I see on the original PR that subheader
and divider
were at the root of the item
We are quite interested in this feature and I would love to help moving this PR forward. But it is, I think, too much to handle safely by people unfamilliar with the Vuetify codebase. Would a core member be able to help on this ? @johnleider @KaelWD ? |
I've asked @nekosaur if he could take a look at some point when he has time. |
Original PR: #15728
Description
This is just an updated version of #15728, since the functionality is still missing and the PR was closed as stale.
@nekosaur I hope this was okay?
You are welcome to update and fix accordingly.
I am not 100% in the Vuetify game and I might have made mistakes merging
master
. I am especially insecure about the changes inVTreeView
, since the component was not present when the original PR was created.Markup:
As described here: https://vuetifyjs.com/en/getting-started/contributing/#for-docs-language