mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Fixes issue where type query datasource had incorrect time controls when datasource type was 'query' (#20923)
This commit is contained in:
parent
0d8889dc9c
commit
1a8c28db3d
@ -54,11 +54,11 @@ const getMemoizedSectionsToRender = memoizeOne(
|
|||||||
|
|
||||||
const { datasourceAndVizType } = sections;
|
const { datasourceAndVizType } = sections;
|
||||||
|
|
||||||
// list of datasource-specific controls that should be removed
|
// list of datasource-specific controls that should be removed if the datasource is a specific type
|
||||||
const invalidControls =
|
const filterControlsForTypes = [DatasourceType.Query, DatasourceType.Table];
|
||||||
datasourceType === 'table'
|
const invalidControls = filterControlsForTypes.includes(datasourceType)
|
||||||
? ['granularity']
|
? ['granularity']
|
||||||
: ['granularity_sqla', 'time_grain_sqla'];
|
: ['granularity_sqla', 'time_grain_sqla'];
|
||||||
|
|
||||||
return [datasourceAndVizType]
|
return [datasourceAndVizType]
|
||||||
.concat(controlPanelSections.filter(isControlPanelSectionConfig))
|
.concat(controlPanelSections.filter(isControlPanelSectionConfig))
|
||||||
|
Loading…
Reference in New Issue
Block a user