From fef2016b6afce2bb41697d638312abc6191bc398 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Mon, 19 Sep 2022 17:07:55 +0530 Subject: [PATCH] fix: text left for two column forms --- src/components/Controls/Base.vue | 3 ++- src/components/TwoColumnForm.vue | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Controls/Base.vue b/src/components/Controls/Base.vue index 6007f2d9..dbd34c79 100644 --- a/src/components/Controls/Base.vue +++ b/src/components/Controls/Base.vue @@ -39,6 +39,7 @@ export default { size: String, showLabel: Boolean, autofocus: Boolean, + textRight: { type: [null, Boolean], default: null }, readOnly: { type: [null, Boolean], default: null }, required: { type: [null, Boolean], default: null }, }, @@ -78,7 +79,7 @@ export default { 'placeholder-gray-500', ]; - if (isNumeric(this.df)) { + if (this.textRight ?? isNumeric(this.df)) { classes.push('text-right'); } diff --git a/src/components/TwoColumnForm.vue b/src/components/TwoColumnForm.vue index 53359a97..a5434dc6 100644 --- a/src/components/TwoColumnForm.vue +++ b/src/components/TwoColumnForm.vue @@ -81,6 +81,7 @@ :value="getRegularValue(df)" :class="{ 'p-2': df.fieldtype === 'Check' }" :read-only="readOnly" + :text-right="false" @change="async (value) => await onChange(df, value)" @focus="activateInlineEditing(df)" @new-doc="async (newdoc) => await onChange(df, newdoc.name)"