Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Cross filters initial scope #25074

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions superset-frontend/src/dashboard/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DatasourceType } from '@superset-ui/core';
import { DatasourceType, NativeFilterScope } from '@superset-ui/core';
import { Datasource } from 'src/dashboard/types';
import { DASHBOARD_ROOT_ID } from './util/constants';
/**
Expand Down Expand Up @@ -44,7 +44,7 @@ export const FILTER_BAR_TABS_HEIGHT = 46;
export const BUILDER_SIDEPANEL_WIDTH = 374;
export const OVERWRITE_INSPECT_FIELDS = ['css', 'json_metadata.filter_scopes'];

export const DEFAULT_CROSS_FILTER_SCOPING = {
export const DEFAULT_CROSS_FILTER_SCOPING: NativeFilterScope = {
rootPath: [DASHBOARD_ROOT_ID],
excluded: [],
};
2 changes: 1 addition & 1 deletion superset-frontend/src/dashboard/util/crossFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const getCrossFiltersConfiguration = (
return undefined;
}

const globalChartConfiguration = metadata.global_chart_configuration
const globalChartConfiguration = metadata.global_chart_configuration?.scope
? {
scope: metadata.global_chart_configuration.scope,
chartsInScope: getChartIdsInFilterScope(
Expand Down
Loading