Skip to content

Commit

Permalink
fix(defaults): add reactive dependency to original prop
Browse files Browse the repository at this point in the history
fixes #16907
  • Loading branch information
KaelWD committed Mar 14, 2023
1 parent d8fd229 commit e59dbdb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vuetify/src/util/defineComponent.tsx
Expand Up @@ -65,10 +65,11 @@ export const defineComponent = (function defineComponent (options: ComponentOpti
const componentDefaults = computed(() => defaults.value![props._as ?? options.name!])
const _props = new Proxy(props, {
get (target, prop) {
const propValue = Reflect.get(target, prop)
if (typeof prop === 'string' && !propIsDefined(vm.vnode, prop)) {
return componentDefaults.value?.[prop] ?? defaults.value!.global?.[prop] ?? target[prop]
return componentDefaults.value?.[prop] ?? defaults.value!.global?.[prop] ?? propValue
}
return Reflect.get(target, prop)
return propValue
},
})

Expand Down

0 comments on commit e59dbdb

Please sign in to comment.