Altinn / Altinn/app-frontend-react

Front end error when using datamodel type "Kombinasjon" on top level with type "one_of"

Open
#2,130 0 comments 0 reactions 0 assignees View on GitHub
area/data-storage kind/feature-request org/srf
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

### Description of the bug

When having a datatype "Kombinasjon" and using "one_of" on the top level in the datamodel the frontend presents error messages.

![image (16)](https://github.com/Altinn/app-frontend-react/assets/44457738/634d9a41-9c8e-4e2e-a573-7fd798f2793d)
![image (17)](https://github.com/Altinn/app-frontend-react/assets/44457738/af66b571-4d74-4fd7-8dae-7d6d7dbd5b30)

Link to Slack thead https://altinn.slack.com/archives/C02EJ9HKQA3/p1717418871792039

Please note that I have not pinpointed exactly what combinations that fail.

Form with the issue: https://altinn.studio/repos/srf/anmodning-kapitalkonto (NB: We have changed the form after the issue, so you need to revert to https://altinn.studio/repos/srf/anmodning-kapitalkonto/commit/61317cc04e8a8940557d2ab9210fad47870deb9f for having the error)

### Steps To Reproduce

* Create a form
* Add a type "Kombinasjon" on top level using "one_of"
* Use that datamodel reference on a field in the form
* Open the form and observe the error message.

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Revert the anmodning-kapitalkonto form to commit 61317cc04e8a8940557d2ab9210fad47870deb9f and reproduce the error using a top-level Kombinasjon type with one_of. Trace the frontend failure from the affected datamodel field; done means the form opens without the reported error for the failing combination.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.