altinn-studio
altinn-studio copied to clipboard
Users are not warned of unsaved data when leaving data model editor
Describe the bug
Until #7246 is implemented we should warn the users that they have unsaved data when leaving the data model editor tool.
To Reproduce
Steps to reproduce the behavior:
- Go to data model editor
- Make some changes
- Try navigating away from the data model tool
- See that no warning is displayed and when returning to the editor the changes are lost
Expected behavior
Should present a warning that we have unsaved changes. An alert is probably enough.
If you can trigger alert (or confirm to give a cancellation option), you can probably trigger a save as well?
We will implement this (alert with confirm leaving or cancel to go back and save) now as a quick fix to be able to enable the new data modelling tool asap. Will create new issue to analyze/implement a more long term solution. F.ex. autosave without model generation.
This can be closed when autosave #9068 is merged.
JSON schema is autosaved. Closing this issue.