-
-
Notifications
You must be signed in to change notification settings - Fork 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
[Bug Report][3.0.0] v-autocomplete items header / divider not working #15721
Comments
A workaround for this is very easy with item slots. It was a nice little feature of v2 but not critical. <template #item="{ item, props }">
<!-- Divider in items not implemented yet in Vuetify 3 -->
<v-divider v-if="item.value === 'f'" />
<v-list-item v-bind="props" :title="item.title" :value="item.value" />
</template> |
If you consider this to be an enhancement and not a bug, it would be nice if you could remove this feature from the documentation... |
Any update? in A temporal fix:
|
Please remove this from the documentation if this is not working anymore. Also related: #4148 (comment)
Temporal fix for multiple select with checkbox based on previous comments and source code for the item slot (also checking if the list item is an object or not): <template #item="{item, props}">
<VDivider v-if="typeof item.raw === 'object' && 'divider' in item.raw" />
<VListSubheader
v-else-if="typeof item.raw === 'object' && 'header' in item.raw"
:title="item.raw.header"
/>
<VListItem
v-else
v-bind="props"
:label="item.title"
:value="item.value"
>
<template #prepend="status">
<VCheckboxBtn
:key="item.value"
:modelValue="status.isSelected"
:ripple="false"
tabindex="-1"
/>
</template>
</VListItem>
</template> Would be better though if the code is working as the docs, so we as developers don't need to recode the whole core functionality again. |
Environment
Vuetify Version: 3.0.0-beta.9
Vue Version: 3.2.38
Browsers: Chrome 104.0.0.0
OS: Windows 10
Steps to reproduce
This feature does not work in your example.
Expected Behavior
v-autocomplete reads the options in the object.
Actual Behavior
Just empty space
Reproduction Link
https://codepen.io/ppyl-datboi/pen/dyebexE?editors=101
The text was updated successfully, but these errors were encountered: