Skip to content

Commit

Permalink
Merge branch 'dev' into fix/upgrade-analayitcs-for-interp-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen authored Apr 24, 2024
2 parents d7a5cdc + c0fc1d6 commit 76f2495
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const IframePlugin = ({
() => ({
isVisualizationLoaded: true,
forDashboard: true,
displayProperty: userSettings.displayProperty,
displayProperty: userSettings.keyAnalysisDisplayProperty,
visualization,
onError,

Expand Down
7 changes: 5 additions & 2 deletions src/components/UserSettingsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ const UserSettingsProvider = ({ children }) => {

setSettings({
...userSettings,
displayProperty: userSettings.keyAnalysisDisplayProperty,
displayProperty:
userSettings.keyAnalysisDisplayProperty === 'name'
? 'displayName'
: 'displayShortName',
})
}
fetchData()
}, [])
}, [engine])

return (
<UserSettingsCtx.Provider
Expand Down
16 changes: 9 additions & 7 deletions src/modules/useDimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const useDimensions = (doFetch) => {
try {
const unfilteredDimensions = await apiFetchDimensions(
dataEngine,
userSettings.keyAnalysisDisplayProperty
userSettings.displayProperty
)

dispatch(
Expand All @@ -28,14 +28,16 @@ const useDimensions = (doFetch) => {
}
}

if (
!dimensions.length &&
doFetch &&
userSettings.keyAnalysisDisplayProperty
) {
if (!dimensions.length && doFetch && userSettings.displayProperty) {
fetchDimensions()
}
}, [dimensions, doFetch, userSettings.keyAnalysisDisplayProperty])
}, [
dimensions,
doFetch,
userSettings.displayProperty,
dispatch,
dataEngine,
])

return dimensions
}
Expand Down
4 changes: 1 addition & 3 deletions src/pages/view/TitleBar/FilterDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ const FilterDialog = ({
dimensionId={dimension.id}
onSelect={onSelectItems}
dimensionTitle={dimension.name}
displayNameProp={
userSettings.keyAnalysisDisplayProperty
}
displayNameProp={userSettings.displayProperty}
/>
)
}
Expand Down

0 comments on commit 76f2495

Please sign in to comment.