Skip to content

Properly unset node data#91

Merged
mariusheine merged 2 commits intomainfrom
properly-unset-node-data
Feb 13, 2026
Merged

Properly unset node data#91
mariusheine merged 2 commits intomainfrom
properly-unset-node-data

Conversation

@mariusheine
Copy link
Member

@mariusheine mariusheine commented Feb 13, 2026

Assume there is a conditionally shown element and the user has data for that field. If this element becomes hidden the according data gets removed so the resulting object should be the same as when the user never opened the form with that element visible.

Currently this is not working, because when the element gets hidden we set the associated field in the data to undefined. The problem is that undefined is not equal to a missing field in terms of operations like isEqual from lodash.

Some sample data to visualize the difference:

element 'b' shown with value element 'b' hidden afterwards element 'b' never was displayed
{ a: 10, b: 'shown' } { a: 10, b: undefined } { a: 10 }

@mariusheine mariusheine merged commit f2a5591 into main Feb 13, 2026
6 checks passed
@mariusheine mariusheine deleted the properly-unset-node-data branch February 13, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant