diff --git a/packages/core/src/basecomponent/BaseComponent.vue b/packages/core/src/basecomponent/BaseComponent.vue index 70e56ad79..b60fac26e 100644 --- a/packages/core/src/basecomponent/BaseComponent.vue +++ b/packages/core/src/basecomponent/BaseComponent.vue @@ -320,6 +320,11 @@ export default { isUnstyled() { return this.unstyled !== undefined ? this.unstyled : this.$primevueConfig?.unstyled; }, + $inProps() { + const nodePropKeys = Object.keys(this.$.vnode?.props); + + return Object.fromEntries(Object.entries(this.$props).filter(([k]) => nodePropKeys?.includes(k))); + }, $theme() { return this.$primevueConfig?.theme; }, diff --git a/packages/core/src/baseeditableholder/BaseEditableHolder.vue b/packages/core/src/baseeditableholder/BaseEditableHolder.vue index d24f5c332..d94effca2 100644 --- a/packages/core/src/baseeditableholder/BaseEditableHolder.vue +++ b/packages/core/src/baseeditableholder/BaseEditableHolder.vue @@ -98,7 +98,7 @@ export default { return this.d_value ?? this.$pcForm?.initialValues?.[this.$formName]; }, controlled() { - return this.defaultValue === undefined; + return this.$inProps.hasOwnProperty('modelValue') || (!this.$inProps.hasOwnProperty('modelValue') && !this.$inProps.hasOwnProperty('defaultValue')); }, // @deprecated use $filled instead filled() { diff --git a/packages/primevue/src/tree/TreeNode.vue b/packages/primevue/src/tree/TreeNode.vue index d1e4a9439..c91c37dc3 100755 --- a/packages/primevue/src/tree/TreeNode.vue +++ b/packages/primevue/src/tree/TreeNode.vue @@ -30,7 +30,7 @@