rabumaabraham commented on code in PR #45145:
URL: https://github.com/apache/superset/pull/45145#discussion_r4234176132


##########
superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx:
##########
@@ -46,17 +46,23 @@ export type SharedColumnConfigProp =
   | 'displayTypeIcon'
   | 'currencyFormat';
 
+const d3NumberFormatOptions: [string, string][] = [
+  ...D3_FORMAT_OPTIONS,
+  [',.0f', ',.0f (12,345)'],
+];
+
 const d3NumberFormat: ControlFormItemSpec<'Select'> = {
   allowNewOptions: true,
   controlType: 'Select',
   label: t('D3 format'),
   description: D3_FORMAT_DOCS,
-  options: D3_FORMAT_OPTIONS.map(option => ({
+  options: d3NumberFormatOptions.map(option => ({
     value: option[0],
     label: option[1],
   })),
   defaultValue: D3_FORMAT_OPTIONS[0][0],
   creatable: true,
+  tokenSeparators: ['\n', '\t', ';'],

Review Comment:
   I kept the existing semicolon separator to avoid changing existing 
tokenization behavior beyond the scope of this fix. This change specifically 
ensures that commas remain part of D3 number format strings. I have also 
documented why commas are excluded from `tokenSeparators`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to