From 5b1d3f89c3e1437b429c078a4b2c5cb3d841b89d Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Fri, 18 Oct 2024 17:29:47 +0100 Subject: [PATCH] Refactor on Base* structure --- packages/core/src/baseeditableholder/BaseEditableHolder.vue | 4 ++-- packages/core/src/baseinput/BaseInput.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/baseeditableholder/BaseEditableHolder.vue b/packages/core/src/baseeditableholder/BaseEditableHolder.vue index 787aedbf9..6bf920889 100644 --- a/packages/core/src/baseeditableholder/BaseEditableHolder.vue +++ b/packages/core/src/baseeditableholder/BaseEditableHolder.vue @@ -21,7 +21,7 @@ export default { }, invalid: { type: Boolean, - default: false + default: undefined }, disabled: { type: Boolean, @@ -80,7 +80,7 @@ export default { return isNotEmpty(this.d_value); }, $invalid() { - return this.invalid || this.$pcForm?.states?.[this.$formName]?.invalid; + return this.invalid ?? this.$pcForm?.states?.[this.$formName]?.invalid; }, $formName() { return this.formControl?.name || this.name || this.$attrs.name; diff --git a/packages/core/src/baseinput/BaseInput.vue b/packages/core/src/baseinput/BaseInput.vue index aa68859a3..1088b109f 100644 --- a/packages/core/src/baseinput/BaseInput.vue +++ b/packages/core/src/baseinput/BaseInput.vue @@ -28,7 +28,7 @@ export default { }, computed: { $variant() { - return this.variant || this.$primevue.config.inputStyle || this.$primevue.config.inputVariant; + return this.variant ?? (this.$primevue.config.inputStyle || this.$primevue.config.inputVariant); }, $fluid() { return this.fluid ?? !!this.$pcFluid;