fix: Revert shared controls typing change. (#22014)
This commit is contained in:
parent
ba65f66897
commit
4cbd70db34
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Reference in New Issue