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

fix: if a data model field binding is removed, delete the prop #14297

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

lassopicasso
Copy link
Contributor

@lassopicasso lassopicasso commented Dec 16, 2024

Description

If removed, set the data model field as undefined.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@github-actions github-actions bot added area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution. frontend labels Dec 16, 2024
@lassopicasso lassopicasso changed the title if empty string save as undefined fix: if a data model field binding is removed, remove prop Dec 16, 2024
@lassopicasso lassopicasso changed the title fix: if a data model field binding is removed, remove prop fix: if a data model field binding is removed, remove the prop Dec 16, 2024
@lassopicasso lassopicasso changed the title fix: if a data model field binding is removed, remove the prop fix: if a data model field binding is removed, delete the prop Dec 16, 2024
@lassopicasso lassopicasso linked an issue Dec 16, 2024 that may be closed by this pull request
@lassopicasso lassopicasso marked this pull request as ready for review December 17, 2024 00:04
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.52%. Comparing base (8783861) to head (d69792f).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14297   +/-   ##
=======================================
  Coverage   95.52%   95.52%           
=======================================
  Files        1831     1831           
  Lines       23785    23790    +5     
  Branches     2755     2757    +2     
=======================================
+ Hits        22720    22725    +5     
  Misses        807      807           
  Partials      258      258           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor Author

@lassopicasso lassopicasso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @mlqn ! The code handles a complicated case, and is solid! As we talked about, prob add a test when the value is undefined or null.
I would have approved this, but github won't let me :D

@mlqn mlqn merged commit fd53718 into main Dec 18, 2024
10 checks passed
@mlqn mlqn deleted the fix-empty-string-data-model-field-binding branch December 18, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. frontend solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing a data model binding should delete the entire node
3 participants