diff --git a/src/components/UserSettingsProvider.js b/src/components/UserSettingsProvider.js index 393a9eb31..bf451a501 100644 --- a/src/components/UserSettingsProvider.js +++ b/src/components/UserSettingsProvider.js @@ -17,7 +17,9 @@ const UserSettingsProvider = ({ children }) => { setSettings({ ...userSettings, - displayProperty: userSettings.keyAnalysisDisplayProperty, + displayProperty: userSettings.keyAnalysisDisplayProperty === 'name' + ? 'displayName' + : 'displayShortName', }) } fetchData() diff --git a/src/modules/useDimensions.js b/src/modules/useDimensions.js index ad81b7400..f0efb0558 100644 --- a/src/modules/useDimensions.js +++ b/src/modules/useDimensions.js @@ -17,7 +17,7 @@ const useDimensions = (doFetch) => { try { const unfilteredDimensions = await apiFetchDimensions( dataEngine, - userSettings.keyAnalysisDisplayProperty + userSettings.displayProperty ) dispatch( @@ -31,11 +31,11 @@ const useDimensions = (doFetch) => { if ( !dimensions.length && doFetch && - userSettings.keyAnalysisDisplayProperty + userSettings.displayProperty ) { fetchDimensions() } - }, [dimensions, doFetch, userSettings.keyAnalysisDisplayProperty]) + }, [dimensions, doFetch, userSettings.displayProperty, dispatch, dataEngine]) return dimensions } diff --git a/src/pages/view/TitleBar/FilterDialog.js b/src/pages/view/TitleBar/FilterDialog.js index 0cb807089..8ea09b116 100644 --- a/src/pages/view/TitleBar/FilterDialog.js +++ b/src/pages/view/TitleBar/FilterDialog.js @@ -120,7 +120,7 @@ const FilterDialog = ({ onSelect={onSelectItems} dimensionTitle={dimension.name} displayNameProp={ - userSettings.keyAnalysisDisplayProperty + userSettings.displayProperty } /> )