File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ const DashboardTimeRangeSlider = ({
185185
186186 const mountedForSomeTime = useTimeout ( 500 , mounted ) ;
187187
188- if ( ! filter || ! timeRange || filter . type !== "timeRange" ) {
188+ if ( ! filter || ! timeRange || filter . type !== "timeRange" || ! filter . active ) {
189189 return null ;
190190 }
191191
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ import {
4141import {
4242 Dimension ,
4343 TemporalDimension ,
44+ isJoinByComponent ,
4445 isTemporalDimension ,
4546} from "@/domain/data" ;
4647import { useTimeFormatLocale , useTimeFormatUnit } from "@/formatters" ;
@@ -129,7 +130,16 @@ const LayoutSharedFiltersConfigurator = () => {
129130 } ) ;
130131
131132 const dimensionsByIri = useMemo ( ( ) => {
132- return keyBy ( data . data ?. dataCubesComponents . dimensions , ( x ) => x . iri ) ;
133+ const res : Record < string , Dimension > = { } ;
134+ for ( const dim of data . data ?. dataCubesComponents . dimensions ?? [ ] ) {
135+ res [ dim . iri ] = dim ;
136+ if ( isJoinByComponent ( dim ) ) {
137+ for ( const o of dim . originalIris ) {
138+ res [ o . dimensionIri ] = dim ;
139+ }
140+ }
141+ }
142+ return res ;
133143 } , [ data . data ?. dataCubesComponents . dimensions ] ) ;
134144
135145 const sharedFiltersByIri = useMemo ( ( ) => {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 useConfiguratorState ,
1313} from "@/configurator" ;
1414import { truthy } from "@/domain/types" ;
15+ import { getOriginalIris , isJoinById } from "@/graphql/join" ;
1516import {
1617 createBoundUseStoreWithSelector ,
1718 ExtractState ,
@@ -177,7 +178,10 @@ export const getPotentialSharedFilters = (
177178 : undefined ;
178179 if ( field && "componentIri" in field ) {
179180 return {
180- componentIri : field . componentIri as string ,
181+ /** Unjoined dimension */
182+ componentIri : isJoinById ( field . componentIri as string )
183+ ? getOriginalIris ( field . componentIri , config ) [ 0 ]
184+ : field . componentIri ,
181185 chartKey : config . key ,
182186 } ;
183187 }
You can’t perform that action at this time.
0 commit comments