From 1747dc97310056705c5b09b0ffc177b09acf3f7f Mon Sep 17 00:00:00 2001 From: yashgupta-hyland Date: Tue, 3 Dec 2024 13:31:36 +0530 Subject: [PATCH] ELEMENTS-1771:Allow option to configure Integer display Formatting nuxeo-checkbox-aggregation.js --- ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js b/ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js index 63fb410fd..0aa1ef7ac 100644 --- a/ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js +++ b/ui/nuxeo-aggregation/nuxeo-checkbox-aggregation.js @@ -257,15 +257,11 @@ import { AggregationBehavior } from './nuxeo-aggregation-behavior.js'; _formatDocCount(docCount) { // Fetch the property value from web-ui-properties.xml - const isNumberFormattingEnabled = - Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.numberFormattingEnabled !== undefined - ? Nuxeo.UI.config.numberFormattingEnabled - : false; // Default to false if the property is not set - + const isNumberFormattingEnabled = Nuxeo?.UI?.config?.numberFormattingEnabled || false; if (isNumberFormattingEnabled) { return new Intl.NumberFormat().format(docCount); // Apply formatting if enabled } - return docCount.toString(); // Return if formatting is disabled + return docCount; // Return if formatting is disabled } _computeVisibleBuckets(buckets, visibleItems, _showAll) {