eclipsesource / eclipsesource/jsonforms

Investigate (and fix) a potential update bug

Open
#1,694 0 comments 0 reactions 0 assignees View on GitHub
material more information required react
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

**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".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.