Skip to content

Conversation

kchobantonov
Copy link
Contributor

…a is not reset to the initial state

Copy link

netlify bot commented Aug 12, 2025

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit b27ce7f
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/68bb1d6d09882700081fe430
😎 Deploy Preview https://deploy-preview-2478--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kchobantonov
Copy link
Contributor Author

@sdirix please review, to check the issue in the current master branch just apply the change for ExampleView.vue and then try to test the additional-errors example, e.g. change the form once it is loaded and then click on the "Add Additonal Error" button and observe that the form data is reset, then check the https://deploy-preview-2478--jsonforms-examples.netlify.app/vue-vuetify/#additional-errors

@coveralls
Copy link

coveralls commented Aug 13, 2025

Coverage Status

coverage: 82.791%. remained the same
when pulling b27ce7f on kchobantonov:preserve-edit-data
into 6542785 on eclipsesource:master.

@sdirix
Copy link
Member

sdirix commented Aug 13, 2025

So the error occurs only if the user of JSON Forms:

  • hands over new additionalErrors to JSON Forms component
  • does not hand over an updated state of the the data

I don't think that this is a valid use case. Either the props of the JSON Forms component are "frozen" and the management is done by JSON Forms, or the props are always live. The error case is a weird mix which is not really valid.

The same issue will occur in Angular and React if only parts of the props are updated. Either they should never be updated by the user, i.e. uncontrolled variant, or they should all be updated, i.e. controlled variant.

@kchobantonov
Copy link
Contributor Author

I understand the distinction between controlled and uncontrolled usage, but in practice consumers of JSON Forms may mix these patterns—intentionally or unintentionally—especially in larger applications with multiple state sources.
From a robustness standpoint, the component should ideally handle all variants, including partial updates.

Even if this “weird mix” is not the recommended pattern, supporting it makes JSON Forms more fault-tolerant and easier to integrate in real-world scenarios where the state flow is not always perfectly aligned with controlled/uncontrolled paradigms.

@kchobantonov
Copy link
Contributor Author

@sdirix @lucas-koehler please also check the update where the generated schema and uischema are properly regenerated when the data is changes - please check this example dynamic when if you change the data to a number and save then the ui will be updated accordingly - in previous versions that was not true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants