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: system / user setting for display name not respected in Org Unit tree (DHIS2-15000) #3195

Merged
merged 4 commits into from
May 13, 2024
Merged
Changes from 1 commit
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/orgunits/OrgUnitSelect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OrgUnitDimension } from '@dhis2/analytics'
import { OrgUnitDimension, useCachedDataQuery } from '@dhis2/analytics'
import { CenteredContent, CircularLoader, Help } from '@dhis2/ui'
import cx from 'classnames'
import PropTypes from 'prop-types'
Expand All @@ -23,6 +23,7 @@ const OrgUnitSelect = ({
hideGroupSelect = false,
warning,
}) => {
const { nameProperty } = useCachedDataQuery()
const { roots, levels, loading, error } = useOrgUnits()
const rows = useSelector((state) => state.layerEdit.rows)
const dispatch = useDispatch()
Expand Down Expand Up @@ -84,6 +85,7 @@ const OrgUnitSelect = ({
hideLevelSelect={hideLevelSelect}
hideGroupSelect={hideGroupSelect}
warning={!hasOrgUnits ? warning : null}
displayNameProp={nameProperty}
/>
</div>
{!hideAssociatedGeometry && <AssociatedGeometrySelect />}
Expand Down
Loading