File tree Expand file tree Collapse file tree 2 files changed +8
-36
lines changed
superset-frontend/src/dashboard/util Expand file tree Collapse file tree 2 files changed +8
-36
lines changed Original file line number Diff line number Diff line change @@ -98,17 +98,10 @@ export const getCrossFiltersConfiguration = (
9898 } ,
9999 } ;
100100 }
101- chartConfiguration [ chartId ] . crossFilters . chartsInScope =
102- isCrossFilterScopeGlobal ( chartConfiguration [ chartId ] . crossFilters . scope )
103- ? globalChartConfiguration . chartsInScope . filter (
104- id => id !== Number ( chartId ) ,
105- )
106- : getChartIdsInFilterScope (
107- chartConfiguration [ chartId ] . crossFilters
108- . scope as NativeFilterScope ,
109- Object . values ( charts ) . map ( chart => chart . id ) ,
110- chartLayoutItems ,
111- ) ;
101+ chartConfiguration [ chartId ] . crossFilters . chartsInScope =
102+ Object . values ( charts )
103+ . map ( chart => chart . id )
104+ . filter ( id => id !== Number ( chartId ) ) ;
112105 }
113106 } ) ;
114107
Original file line number Diff line number Diff line change @@ -55,31 +55,10 @@ function getRelatedChartsForCrossFilter(
5555 slices : Record < string , Slice > ,
5656 scope : number [ ] ,
5757) : number [ ] {
58- const sourceSlice = slices [ filterKey ] ;
59-
60- if ( ! sourceSlice ) return [ ] ;
61-
62- const fullScope = [
63- ...scope . filter ( s => String ( s ) !== filterKey ) ,
64- Number ( filterKey ) ,
65- ] ;
66- const scopeSet = new Set ( scope ) ;
67-
68- return Object . values ( slices ) . reduce ( ( result : number [ ] , slice ) => {
69- if ( slice . slice_id === Number ( filterKey ) ) {
70- return result ;
71- }
72- // Check if it's in the global scope
73- if ( isGlobalScope ( fullScope , slices ) ) {
74- result . push ( slice . slice_id ) ;
75- return result ;
76- }
77- // Check if it's hand-picked in scope
78- if ( scopeSet . has ( slice . slice_id ) ) {
79- result . push ( slice . slice_id ) ;
80- }
81- return result ;
82- } , [ ] ) ;
58+ // Always return all charts except source chart
59+ return Object . values ( slices )
60+ . map ( slice => slice . slice_id )
61+ . filter ( id => id !== Number ( filterKey ) ) ;
8362}
8463
8564export function getRelatedCharts (
You can’t perform that action at this time.
0 commit comments