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: short name was not being shown in charts #2959

Merged
merged 5 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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: 3 additions & 1 deletion src/components/UserSettingsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@

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

Check warning on line 26 in src/components/UserSettingsProvider.js

View workflow job for this annotation

GitHub Actions / lint

React Hook useEffect has a missing dependency: 'engine'. Either include it or remove the dependency array

return (
<UserSettingsCtx.Provider
Expand Down
6 changes: 3 additions & 3 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 @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/view/TitleBar/FilterDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const FilterDialog = ({
onSelect={onSelectItems}
dimensionTitle={dimension.name}
displayNameProp={
userSettings.keyAnalysisDisplayProperty
userSettings.displayProperty
}
/>
)
Expand Down
Loading