diff --git a/package.json b/package.json index f899103c1..3da8866fe 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "start-server-and-test": "^2.0.3" }, "dependencies": { - "@dhis2/analytics": "^26.6.5", + "@dhis2/analytics": "^26.6.9", "@dhis2/app-runtime": "3.9.4", "@dhis2/app-runtime-adapter-d2": "^1.1.0", "@dhis2/app-service-alerts": "3.9.4", diff --git a/src/components/orgunits/OrgUnitSelect.js b/src/components/orgunits/OrgUnitSelect.js index 36f361018..55d49f5b3 100644 --- a/src/components/orgunits/OrgUnitSelect.js +++ b/src/components/orgunits/OrgUnitSelect.js @@ -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' @@ -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() @@ -84,6 +85,7 @@ const OrgUnitSelect = ({ hideLevelSelect={hideLevelSelect} hideGroupSelect={hideGroupSelect} warning={!hasOrgUnits ? warning : null} + displayNameProp={nameProperty} /> {!hideAssociatedGeometry && } diff --git a/yarn.lock b/yarn.lock index 1d16e278e..9d0e27a3f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2016,10 +2016,10 @@ classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2/analytics@^26.6.5": - version "26.6.5" - resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.6.5.tgz#44ee29a279c37f3969096d859bc0f07d953e3f42" - integrity sha512-ob6kNEEkIAC50RtKuUZWi8Y04uwsPHK/EiYhzxZkSOdS5wFm8X+88KZrD//fILXQjwMhJvl/4+F/T0qVxOF/jQ== +"@dhis2/analytics@^26.6.9": + version "26.6.9" + resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.6.9.tgz#932847c4bee3dd720d5d0b872c6b11eeae8b260c" + integrity sha512-AcU5FKH1Rmi8GdgqdJ1aOPqTKhztLafhzKNvGBdb5rSNR8/KS2djyTxxPhL0fdusu+1Rc04RFSkOLajq3ChVrQ== dependencies: "@dhis2/d2-ui-rich-text" "^7.4.1" "@dhis2/multi-calendar-dates" "1.0.0"