jsonforms icon indicating copy to clipboard operation
jsonforms copied to clipboard

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

Open JBBianchi opened this issue 4 years ago • 0 comments

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.

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

JBBianchi avatar Jul 27 '21 12:07 JBBianchi