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

Schema changes are not reflecting in the form #3927

Closed
4 tasks done
Rozamo opened this issue Oct 28, 2023 · 0 comments · Fixed by #3929
Closed
4 tasks done

Schema changes are not reflecting in the form #3927

Rozamo opened this issue Oct 28, 2023 · 0 comments · Fixed by #3929
Labels

Comments

@Rozamo
Copy link
Contributor

Rozamo commented Oct 28, 2023

Prerequisites

What theme are you using?

core

Version

5.13.2

Current Behavior

The JSON or UI schema changes are not reflecting in playground form. Any change made for example in title or in the property name doesn't show up.

Expected Behavior

Changes in schemas should immediately reflect in the form.

Steps To Reproduce

  1. Go to the playground
  2. Try making any changes in the JSON or UI schema. For example change the title or the widget of a property
  3. There is no change in the form

Environment

- OS: macOS 13.5.1
- Node: 18.15.0
- npm: 9.5.0

Anything else?

The schema changes reflect when there is any change in the form data.

@Rozamo Rozamo added bug needs triage Initial label given, to be assigned correct labels and assigned labels Oct 28, 2023
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Oct 28, 2023
… items

Fixes rjsf-team#3924 by defaulting to an empty object for the `itemSchema` when undefined
Fixes rjsf-team#3927 by fixing `getSnapshotBeforeUpdate()` added for the fix rjsf-team#1794
- In `@rjsf/core` updated `ArrayField`'s `renderFixedArray()` to default the `itemSchema` to an empty object if it is falsy
  - Updated the tests for `ArrayField` to verify the fix
  - Updated the `getSnapshotBeforeUpdate()` to diff the old and new props and to set the `shouldUpdate` prop if the old and new state differs
- Updated `CHANGELOG.md` accordingly
  - Also added entry for the fix for rjsf-team#3919
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Oct 28, 2023
… items

Fixes rjsf-team#3924 by defaulting to an empty object for the `itemSchema` when undefined
Fixes rjsf-team#3927 by fixing `getSnapshotBeforeUpdate()` added for the fix rjsf-team#1794
- In `@rjsf/core` updated `ArrayField`'s `renderFixedArray()` to default the `itemSchema` to an empty object if it is falsy
  - Updated the tests for `ArrayField` to verify the fix
  - Updated the `getSnapshotBeforeUpdate()` to diff the old and new props and to set the `shouldUpdate` prop if the old and new state differs
- Updated `CHANGELOG.md` accordingly
  - Also added entry for the fix for rjsf-team#3919
@heath-freenome heath-freenome removed the needs triage Initial label given, to be assigned correct labels and assigned label Oct 28, 2023
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Oct 28, 2023
… items

Fixes rjsf-team#3924 by defaulting to an empty object for the `itemSchema` when undefined
Fixes rjsf-team#3927 by fixing `getSnapshotBeforeUpdate()` added for the fix rjsf-team#1794
- In `@rjsf/core` updated `ArrayField`'s `renderFixedArray()` to default the `itemSchema` to an empty object if it is falsy
  - Updated the tests for `ArrayField` to verify the fix
  - Updated the `getSnapshotBeforeUpdate()` to diff the old and new props and to set the `shouldUpdate` prop if the old and new state differs
- Updated `CHANGELOG.md` accordingly
  - Also added entry for the fix for rjsf-team#3919
heath-freenome added a commit that referenced this issue Oct 30, 2023
…3929)

Fixes #3924 by defaulting to an empty object for the `itemSchema` when undefined
Fixes #3927 by fixing `getSnapshotBeforeUpdate()` added for the fix #1794
- In `@rjsf/core` updated `ArrayField`'s `renderFixedArray()` to default the `itemSchema` to an empty object if it is falsy
  - Updated the tests for `ArrayField` to verify the fix
  - Updated the `getSnapshotBeforeUpdate()` to diff the old and new props and to set the `shouldUpdate` prop if the old and new state differs
- Updated `CHANGELOG.md` accordingly
  - Also added entry for the fix for #3919
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants