Fixes issue where type query datasource had incorrect time controls when datasource type was 'query' (#20923)

This commit is contained in:
Eric Briscoe 2022-07-29 15:14:03 -07:00 committed by GitHub
parent 0d8889dc9c
commit 1a8c28db3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,9 +54,9 @@ const getMemoizedSectionsToRender = memoizeOne(
const { datasourceAndVizType } = sections;
// list of datasource-specific controls that should be removed
const invalidControls =
datasourceType === 'table'
// 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'];