koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
548 stars 155 forks source link

Changing model via code not working when using sections #220

Closed rFranzr closed 3 years ago

rFranzr commented 3 years ago

When using (tabbed) sections, changing the form model in the code, does not affect the contents of the input fields.

Example: https://codepen.io/rFranzr/pen/LYbqzrE?editors=101

Am I missing something or is this a bug?

albanm commented 3 years ago

Well this is kind of a bug. Ideally reactivity should work perfectly in both directions, but this is quite difficult to achieve and maintain. For the time being you should not presume that it works in all cases and instead trigger a redraw of vjsf in case of a model (or schema) change from outside.

rFranzr commented 3 years ago

Thanks for the fast reply. Since it is working with a non sectioned form I thougt it is also working with a sectioned one.

What exactly do you mean with redraw the form and how do I achieve this?

albanm commented 3 years ago

This article is good on the subject.