Browse Source

fix: update dtxs when decimal precision is changing

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7278/head
Pranav C 11 months ago
parent
commit
b47ca3cdbb
  1. 6
      packages/nc-gui/components/smartsheet/column/DecimalOptions.vue

6
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
}
</script>
<template>
@ -38,6 +43,7 @@ onMounted(() => {
v-if="vModel.meta?.precision"
v-model:value="vModel.meta.precision"
dropdown-class-name="nc-dropdown-decimal-format"
@change="onPrecisionChange"
>
<a-select-option v-for="(format, i) of precisionFormats" :key="i" :value="format">
<div class="flex gap-2 w-full justify-between items-center">

Loading…
Cancel
Save