chore: Remove the ability to switch to filter-box chart when DASHBOARD_NATIVE_FILTERS feature is enabled (#25275)

This commit is contained in:
John Bodley 2023-09-12 14:39:38 -07:00 committed by GitHub
parent a747eaa740
commit 8eff5a75b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -23,6 +23,8 @@ import {
getChartMetadataRegistry,
styled,
SupersetTheme,
isFeatureEnabled,
FeatureFlag,
} from '@superset-ui/core';
import { usePluginContext } from 'src/components/DynamicPlugins';
import Modal from 'src/components/Modal';
@ -46,6 +48,13 @@ const bootstrapData = getBootstrapData();
const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST || [];
const metadataRegistry = getChartMetadataRegistry();
if (
isFeatureEnabled(FeatureFlag.DASHBOARD_NATIVE_FILTERS) &&
!denyList.includes('filter_box')
) {
denyList.push('filter_box');
}
export const VIZ_TYPE_CONTROL_TEST_ID = 'viz-type-control';
function VizSupportValidation({ vizType }: { vizType: string }) {

View File

@ -70,7 +70,7 @@ const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST || [];
if (
isFeatureEnabled(FeatureFlag.DASHBOARD_NATIVE_FILTERS) &&
!('filter_box' in denyList)
!denyList.includes('filter_box')
) {
denyList.push('filter_box');
}