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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4cbd70db34 fix: Revert shared controls typing change. (#22014)
4cbd70db34 is described below

commit 4cbd70db34b140a026ef1a86a8ef0ba3355a350e
Author: Cody Leff <[email protected]>
AuthorDate: Wed Nov 2 21:58:38 2022 -0600

    fix: Revert shared controls typing change. (#22014)
---
 superset-frontend/packages/superset-ui-chart-controls/src/types.ts   | 2 +-
 .../plugins/legacy-plugin-chart-histogram/src/controlPanel.ts        | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

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 fcb19e702d..c2ec315274 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts
@@ -242,7 +242,7 @@ export interface BaseControlConfig<
   ) => boolean;
   mapStateToProps?: (
     state: ControlPanelState,
-    controlState?: ControlState,
+    controlState: ControlState,
     // TODO: add strict `chartState` typing (see 
superset-frontend/src/explore/types)
     chartState?: AnyDict,
   ) => ExtraControlProps;
diff --git 
a/superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts 
b/superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts
index d976b16bd2..08e315ba40 100644
--- 
a/superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts
+++ 
b/superset-frontend/plugins/legacy-plugin-chart-histogram/src/controlPanel.ts
@@ -25,14 +25,15 @@ import {
   sections,
   getStandardizedControls,
   sharedControls,
+  ControlState,
 } from '@superset-ui/chart-controls';
 
 const columnsConfig = {
   ...sharedControls.columns,
   label: t('Columns'),
   description: t('Select the numeric columns to draw the histogram'),
-  mapStateToProps: (state: ControlPanelState) => ({
-    ...(sharedControls.columns.mapStateToProps?.(state) || {}),
+  mapStateToProps: (state: ControlPanelState, controlState: ControlState) => ({
+    ...(sharedControls.columns.mapStateToProps?.(state, controlState) || {}),
     choices: columnChoices(state.datasource),
   }),
   validators: [validateNonEmpty],

Reply via email to