You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2024/02/13 16:02:20 UTC

(superset) 07/16: fix(explore): allow free-form d3 format on custom column formatting (#27023)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/superset.git

commit d572af307349762a92d29451661fe769d5ab22e5
Author: JUST.in DO IT <ju...@airbnb.com>
AuthorDate: Thu Feb 8 09:27:59 2024 -0800

    fix(explore): allow free-form d3 format on custom column formatting (#27023)
    
    (cherry picked from commit fd06ff3745b0ce96ef2506e18b6d5f27d3eee045)
---
 superset-frontend/packages/superset-ui-chart-controls/src/types.ts       | 1 +
 .../src/explore/components/controls/ColumnConfigControl/constants.tsx    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts
index 9314f8d33f..83b711baaa 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts
@@ -518,6 +518,7 @@ export type ControlFormItemSpec<T extends ControlType = ControlType> = {
   debounceDelay?: number;
 } & (T extends 'Select'
   ? {
+      allowNewOptions?: boolean;
       options: any;
       value?: string;
       defaultValue?: string;
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx
index 684d8faf14..985fc2f47c 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/constants.tsx
@@ -42,6 +42,7 @@ export type SharedColumnConfigProp =
   | 'currencyFormat';
 
 const d3NumberFormat: ControlFormItemSpec<'Select'> = {
+  allowNewOptions: true,
   controlType: 'Select',
   label: t('D3 format'),
   description: D3_FORMAT_DOCS,