Preview Fails When Linking Component to Non-Default Data Model #14104
Labels
added-to-sprint
area/ui-editor
Area: Related to the designer tool for assembling app UI in Altinn Studio.
backend
kind/bug
Used when there is a defect / something is not working as it should.
team/studio-domain2
Description of the bug
When using multiple data models and attempting to link a component to a data model other than the default, the preview fails to render, and the following error appears in the console:
altinn-app-frontend.js:8 TypeError: Cannot read properties of undefined (reading 'getSchemaForPath')
It seems the issue is caused by the lack of a mock in the backend preview, where all data types should be available.
The backend code related to this issue includes:
InstanceForNextTask
returns data typesaltinn-studio/backend/src/Designer/Controllers/Preview/InstancesController.cs
Line 71 in 5b21dae
GetDataTypesForInstance
the service responsible for setting the data types.altinn-studio/backend/src/Designer/Services/Implementation/PreviewService.cs
Line 150 in 5b21dae
Video:
error-when-bind-other-than-default-datatype.mp4
Steps To Reproduce
Additional Information
No response
The text was updated successfully, but these errors were encountered: