@addsign/moje-agenda-shared-lib 2.0.38 → 2.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -535,7 +535,6 @@ function DataTableServer<T extends DataTableInternalItems>({
|
|
|
535
535
|
break;
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
|
|
539
538
|
// Apply number format if column contains numbers
|
|
540
539
|
if (hasNumbers) {
|
|
541
540
|
for (let R = range.s.r; R <= range.e.r; ++R) {
|
|
@@ -549,7 +548,9 @@ function DataTableServer<T extends DataTableInternalItems>({
|
|
|
549
548
|
if (column?.renderXlsOptions?.format) {
|
|
550
549
|
cell.z = column.renderXlsOptions.format;
|
|
551
550
|
} else {
|
|
552
|
-
|
|
551
|
+
// Check if the number has decimal places
|
|
552
|
+
const hasDecimal = cell.v % 1 !== 0;
|
|
553
|
+
cell.z = hasDecimal ? "#,##0.##" : "#,##0"; // Use different formats based on whether decimals exist
|
|
553
554
|
}
|
|
554
555
|
}
|
|
555
556
|
}
|