mirror of https://github.com/apache/superset.git
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;
|
||||
|
||||
// list of datasource-specific controls that should be removed
|
||||
const invalidControls =
|
||||
datasourceType === 'table'
|
||||
? ['granularity']
|
||||
: ['granularity_sqla', 'time_grain_sqla'];
|
||||
// list of datasource-specific controls that should be removed if the datasource is a specific type
|
||||
const filterControlsForTypes = [DatasourceType.Query, DatasourceType.Table];
|
||||
const invalidControls = filterControlsForTypes.includes(datasourceType)
|
||||
? ['granularity']
|
||||
: ['granularity_sqla', 'time_grain_sqla'];
|
||||
|
||||
return [datasourceAndVizType]
|
||||
.concat(controlPanelSections.filter(isControlPanelSectionConfig))
|
||||
|
|
Loading…
Reference in New Issue