Browse Source

fix(nc-gui): decimal cell thousands separator display issue (#9923)

pull/9925/head
Ramesh Mane 1 month ago committed by GitHub
parent
commit
1a5c8447b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      packages/nc-gui/components/cell/Decimal.vue

7
packages/nc-gui/components/cell/Decimal.vue

@ -41,7 +41,12 @@ const displayValue = computed(() => {
if (isNaN(Number(_vModel.value))) return null
if (meta.value.isLocaleString) return roundUpToPrecision(Number(_vModel.value), meta.value.precision ?? 1).toLocaleString()
if (meta.value.isLocaleString) {
return Number(roundUpToPrecision(Number(_vModel.value), meta.value.precision ?? 1)).toLocaleString(undefined, {
minimumFractionDigits: meta.value.precision ?? 1,
maximumFractionDigits: meta.value.precision ?? 1,
})
}
return roundUpToPrecision(Number(_vModel.value), meta.value.precision ?? 1)
})

Loading…
Cancel
Save