fix: Revert shared controls typing change. (#22014)

This commit is contained in:
Cody Leff
2022-11-02 21:58:38 -06:00
committed by GitHub
parent ba65f66897
commit 4cbd70db34
2 changed files with 4 additions and 3 deletions

View File

@@ -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],