diff --git a/packages/vuetify/src/components/VList/VList.tsx b/packages/vuetify/src/components/VList/VList.tsx index 00e020b2a94..fd1d33d9f38 100644 --- a/packages/vuetify/src/components/VList/VList.tsx +++ b/packages/vuetify/src/components/VList/VList.tsx @@ -97,6 +97,7 @@ export const makeVListProps = propsFactory({ 'onClick:open': EventProp<[{ id: unknown, value: boolean, path: unknown[] }]>(), 'onClick:select': EventProp<[{ id: unknown, value: boolean, path: unknown[] }]>(), + 'onUpdate:opened': EventProp<[]>(), ...makeNestedProps({ selectStrategy: 'single-leaf' as const, openStrategy: 'list' as const, diff --git a/packages/vuetify/src/labs/VTreeview/VTreeview.tsx b/packages/vuetify/src/labs/VTreeview/VTreeview.tsx index daaa14820f2..7778c69df26 100644 --- a/packages/vuetify/src/labs/VTreeview/VTreeview.tsx +++ b/packages/vuetify/src/labs/VTreeview/VTreeview.tsx @@ -9,9 +9,10 @@ import { useProxiedModel } from '@/composables/proxiedModel' // Utilities import { computed, provide, ref, toRef, watch } from 'vue' -import { genericComponent, omit, propsFactory, useRender } from '@/util' +import { genericComponent, getCurrentInstance, omit, propsFactory, useRender } from '@/util' // Types +import type { ExtractPublicPropTypes } from 'vue' import { VTreeviewSymbol } from './shared' import type { VListChildrenSlots } from '@/components/VList/VListChildren' import type { ListItem } from '@/composables/list-items' @@ -59,6 +60,7 @@ export const VTreeview = genericComponent( }, setup (props, { slots }) { + const vm = getCurrentInstance('VTreeview') const { items } = useListItems(props) const activeColor = toRef(props, 'activeColor') const baseColor = toRef(props, 'baseColor') @@ -146,7 +148,8 @@ export const VTreeview = genericComponent( }) useRender(() => { - const listProps = VList.filterProps(props) + const listProps = VList.filterProps(vm.vnode.props! as ExtractPublicPropTypes) + const treeviewChildrenProps = VTreeviewChildren.filterProps(props) return ( @@ -158,7 +161,6 @@ export const VTreeview = genericComponent( props.class, ]} style={ props.style } - v-model:opened={ opened.value } v-model:activated={ activated.value } v-model:selected={ selected.value } >