Skip to content

Commit

Permalink
fix: Revert shared controls typing change. (#22014)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyml authored Nov 3, 2022
1 parent ba65f66 commit 4cbd70d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 4cbd70d

Please sign in to comment.