Skip to content

Commit

Permalink
fix: use correct path for extracting data set information
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Nov 19, 2024
1 parent 2ada9a6 commit c23c670
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/DataDimension/Info/DataElementInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const dataElementQuery = {
params: ({ displayNameProp }) => ({
fields: `${getCommonFields(
displayNameProp
)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[id,displayName],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`,
)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`,
}),
},
}
Expand All @@ -29,12 +29,15 @@ export const DataElementInfo = ({ id, displayNameProp }) => {
<th>{i18n.t('Data set(s)')}</th>
<td>
{data?.dataElement.dataSetElements.length === 1 ? (
data.dataElement.dataSetElements[0].displayName
data.dataElement.dataSetElements[0].dataSet
.displayName
) : (
<ul>
{data?.dataElement.dataSetElements.map(
({ id, displayName }) => (
<li key={id}>{displayName}</li>
({ dataSet }) => (
<li key={dataSet.id}>
{dataSet.displayName}
</li>
)
)}
</ul>
Expand Down

0 comments on commit c23c670

Please sign in to comment.