Skip to content

Investigate (and fix) a potential update bug #1694

@sdirix

Description

@sdirix

Describe the bug
I was demonstrated an update bug within the Redux variant of JSON Forms 2.4.0

The app used JSON Forms for a list of elements. Whenever a different element was selected an init action was dispatched with the selected element as the data parameter. Schema and ui schema were always the same.

In their form they used oneOf within the array layout. When the different element was selected and therefore the new init was dispatched, the oneOf renderer kept their state although they were no longer matching the data.

To Do

  1. Rebuild this scenario with the current version of JSON Forms (standalone)
  2. If still reproducible: Fix

Expected behavior
The oneOf renderer should reflect the currently set data, even when data changes after the first render.

Used Setup:

  • Framework: [react]
  • RendererSet: [material]

Workaround:
Forcefully rerender the whole form with each "init".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions