Altinn / Altinn/app-frontend-react
Subform expressions explicit dataType reference fails with more than one data element
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description of the bug
https://altinn.slack.com/archives/C02EJ9HKQA3/p1744022306857699
It looks like we try to load the subform data type in `DatamodelsProvider` when the data type is explicitly referenced in an expression (tableColumns or entryDisplayName which uses data from each subform element). If there are more than one data element, we fail to fetch it since we check that there is exactly one data element.
### Steps To Reproduce
.
### Additional Information
_No response_
Contributor guide
Research direction
Start in DatamodelsProvider and trace how an explicitly referenced subform data type is loaded for tableColumns or entryDisplayName expressions. Reproduce with more than one data element in the subform; done when the referenced data type loads successfully instead of failing the single-data-element check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100