mirror of
https://github.com/apache/superset.git
synced 2024-09-06 13:57:40 -04:00
fix(explore): Fix generic X-axis time grain disappearing (#21484)
This commit is contained in:
parent
2dfcba04b0
commit
324e9979fa
@ -197,8 +197,12 @@ const time_grain_sqla: SharedControlConfig<'SelectControl'> = {
|
|||||||
if (isAdhocColumn(xAxisValue)) {
|
if (isAdhocColumn(xAxisValue)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (isPhysicalColumn(xAxisValue)) {
|
if (isPhysicalColumn(xAxisValue) && Array.isArray(xAxis?.options)) {
|
||||||
return !!xAxis?.options?.[xAxisValue]?.is_dttm;
|
for (let i = 0; i < xAxis.options.length; i += 1) {
|
||||||
|
if (xAxis.options[i].column_name === xAxisValue) {
|
||||||
|
return !!xAxis.options[i].is_dttm;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user