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

React Vanilla Categorization Renderer should handle updated schemas #2097

Closed
sdirix opened this issue Feb 20, 2023 · 0 comments · Fixed by #2120
Closed

React Vanilla Categorization Renderer should handle updated schemas #2097

sdirix opened this issue Feb 20, 2023 · 0 comments · Fixed by #2120
Assignees
Milestone

Comments

@sdirix
Copy link
Member

sdirix commented Feb 20, 2023

Describe the bug

The React Vanilla Categorization renderer maintains local state about the currently selected category. This state is not properly updated when the UI Schema changes and therefore may return a previous category which no longer fits the JSON Schema.

Expected behavior

Whenever a prop of the React Vanilla Categorization renderer changes it should update accordingly.

Steps to reproduce the issue

  1. Render a categorization with React Vanilla
  2. Select a category
  3. Replace schema and uischema with a new Categorization but whose content is completely different
  4. Still the old category of the previous uischema is used, leading for example to "No applicable cell" errors

The problematic code seems to be here.

Screenshots

No response

In which browser are you experiencing the issue?

n/a

Which Version of JSON Forms are you using?

3.0.0

Framework

React

RendererSet

Vanilla

Additional context

Reported in this discussion

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.

2 participants