mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
fix(plugin-chart-echarts): boxplot throw error in the dashboard (#21661)
This commit is contained in:
@@ -172,10 +172,14 @@ const config: ControlPanelConfig = {
|
||||
label: t('Distribute across'),
|
||||
multi: true,
|
||||
description: t('Columns to calculate distribution across.'),
|
||||
initialValue: (control: ControlState, state: ControlPanelState) => {
|
||||
initialValue: (
|
||||
control: ControlState,
|
||||
state: ControlPanelState | null,
|
||||
) => {
|
||||
if (
|
||||
(state && !control?.value) ||
|
||||
(Array.isArray(control?.value) && control.value.length === 0)
|
||||
state &&
|
||||
(!control?.value ||
|
||||
(Array.isArray(control?.value) && control.value.length === 0))
|
||||
) {
|
||||
return [getTemporalColumns(state.datasource).defaultTemporalColumn];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user