Update `controlled` structure in BaseEditableHolder
parent
44100af9a3
commit
2fc29287ff
|
@ -320,6 +320,11 @@ export default {
|
||||||
isUnstyled() {
|
isUnstyled() {
|
||||||
return this.unstyled !== undefined ? this.unstyled : this.$primevueConfig?.unstyled;
|
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() {
|
$theme() {
|
||||||
return this.$primevueConfig?.theme;
|
return this.$primevueConfig?.theme;
|
||||||
},
|
},
|
||||||
|
|
|
@ -98,7 +98,7 @@ export default {
|
||||||
return this.d_value ?? this.$pcForm?.initialValues?.[this.$formName];
|
return this.d_value ?? this.$pcForm?.initialValues?.[this.$formName];
|
||||||
},
|
},
|
||||||
controlled() {
|
controlled() {
|
||||||
return this.defaultValue === undefined;
|
return this.$inProps.hasOwnProperty('modelValue') || (!this.$inProps.hasOwnProperty('modelValue') && !this.$inProps.hasOwnProperty('defaultValue'));
|
||||||
},
|
},
|
||||||
// @deprecated use $filled instead
|
// @deprecated use $filled instead
|
||||||
filled() {
|
filled() {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
</button>
|
</button>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
v-if="checkboxMode"
|
v-if="checkboxMode"
|
||||||
:modelValue="checked"
|
:defaultValue="checked"
|
||||||
:binary="true"
|
:binary="true"
|
||||||
:indeterminate="partialChecked"
|
:indeterminate="partialChecked"
|
||||||
:class="cx('nodeCheckbox')"
|
:class="cx('nodeCheckbox')"
|
||||||
|
|
Loading…
Reference in New Issue