vuetify-jsonschema-form
vuetify-jsonschema-form copied to clipboard
Selection box state is not updated when model has changed
In my scenario I use oneOf
to have a selection box and to display different form elements based on this selection. The whole form is embedded inside of a v-dialog
. However, if I change the underlying model, the selection does not change. This means in my concrete case, when I select something, close the dialog, change the model, and open the dialog again, it still shows the old value (while the model is different by now). It works with a simple manually created v-select
though.
Is there any option I am missing, or is this just a bug?
I don't fully understand the situation. Could you provide a codepen (the doc contains links to init codepens from the examples) ? Or at least a schema.
Okay, I tried to reproduce the problem in a minimal example here: https://codepen.io/tkutz/pen/oNErLaW?editors=1011
When you klick the "toggle schema" button, the model changes, and the v-select gets updated, but the selection box created by vjsf does not update its value. Is there anything I am missing?
It looks like another variant of https://github.com/koumoul-dev/vuetify-jsonschema-form/issues/58
Once bound the model is only reactive one way.
Okay thanks, I managed to get around the issue with the <v-if>
workaround mentioned in #58.