Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview Fails When Linking Component to Non-Default Data Model #14104

Open
lassopicasso opened this issue Nov 19, 2024 · 0 comments · May be fixed by #14154
Open

Preview Fails When Linking Component to Non-Default Data Model #14104

lassopicasso opened this issue Nov 19, 2024 · 0 comments · May be fixed by #14154
Assignees
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

Comments

@lassopicasso
Copy link
Contributor

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:

Video:

error-when-bind-other-than-default-datatype.mp4

Steps To Reproduce

  1. Go to Datamodell page.
  2. Create and generate a new data model.
  3. Navigate to Utforming and select a layout set.
  4. Add a component to the layout.
  5. Configure the component so it is rendered in preview.
  6. Change the data model binding to a model that is not the default.

Additional Information

No response

@lassopicasso lassopicasso added the kind/bug Used when there is a defect / something is not working as it should. label Nov 19, 2024
@lassopicasso lassopicasso added area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. backend team/studio-domain2 labels Nov 19, 2024
@lassopicasso lassopicasso moved this to 📈 Todo in Team Studio Nov 19, 2024
@Jondyr Jondyr self-assigned this Nov 21, 2024
@Jondyr Jondyr removed their assignment Dec 9, 2024
@Jondyr Jondyr moved this from 👷 In Progress to 🔎 Review in Team Studio Dec 9, 2024
@mlqn mlqn self-assigned this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: 🔎 Review
Development

Successfully merging a pull request may close this issue.

3 participants