Update `controlled` structure in BaseEditableHolder
parent
44100af9a3
commit
2fc29287ff
|
@ -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;
|
||||
},
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</button>
|
||||
<Checkbox
|
||||
v-if="checkboxMode"
|
||||
:modelValue="checked"
|
||||
:defaultValue="checked"
|
||||
:binary="true"
|
||||
:indeterminate="partialChecked"
|
||||
:class="cx('nodeCheckbox')"
|
||||
|
|
Loading…
Reference in New Issue