From b47ca3cdbb58ad841bfdd1d7f4823b3c7b10fe5d Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 22 Dec 2023 12:02:34 +0530 Subject: [PATCH] fix: update dtxs when decimal precision is changing Signed-off-by: Pranav C --- .../nc-gui/components/smartsheet/column/DecimalOptions.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/nc-gui/components/smartsheet/column/DecimalOptions.vue b/packages/nc-gui/components/smartsheet/column/DecimalOptions.vue index 65794cbc78..d7884e26f4 100644 --- a/packages/nc-gui/components/smartsheet/column/DecimalOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/DecimalOptions.vue @@ -30,6 +30,11 @@ onMounted(() => { vModel.value.meta.precision = precisionFormats[0] } }) + +// update datatype precision when precision is less than the new value +const onPrecisionChange = (value: number) => { + vModel.value.dtxs = vModel.value.dtxs < value ? value : vModel.value.dtxs +}