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

Difference in mapAdditionalProps props.data and global data when setting a prop as undefined via handleChange #1790

Closed
JBBianchi opened this issue Jul 27, 2021 · 0 comments · Fixed by #2163

Comments

@JBBianchi
Copy link
Contributor

JBBianchi commented Jul 27, 2021

Describe the bug

When implementing DispatchPropsOfControl.handleChange() in a custom control and calling handleChange('somePath', undefined), the property at somePath of the global data object is removed but in mapAdditionalProps(props), the property still exists with an undefined value in props.data.

This is useful when handling additionalProperties for instance.

Expected behavior

For the property to be remove of props.data

Steps to reproduce the issue

https://github.com/JBBianchi/jsonforms-angular-seed/blob/master/src/app/edit-object.renderer.ts#L105

  1. Clone & run the above project
  2. Test and debug the "object editor" sample (not the "dictionary" sample)

Screenshots

No response

In which browser are you experiencing the issue?

any

Framework

Angular

RendererSet

Material

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants