-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Not working when schema and data changes #58
Comments
same issue. |
Nope, I guess it'll require a fix, no? |
I will try to make it work in upcoming major version. But I don't want to spend too much time on current version. Can this be solved with a v-if to destroy / recreate the form when the schema changes ? |
Recreating the form with v-if works.:) |
@nickjfree could you update Codepen with your solutions? |
Cool, thank you @nickjfree ! |
@nickjfree if I use your workaround but mix it with a There's a chance this is specific to my code but I'm wondering if there is a better way for this to be done? Maybe for the form to properly watch the model and update accordingly. I will need this functionality to behave properly in the relatively near future so if there is no additional work-around or work being done here, I may start on a PR, although I may need a nudge in the right direction from you @albanm. |
I tried to look into this a little, but I didn't reach a working solution and reactivity subtleties were giving me headaches. I think even if I were to improve things, perfectly reacting to external changes of both schema and model will never be guaranteed by this library. I strongly suggest working on your side. |
I had very similar issue. When the whole value of model is replaced, the form is not updated. The trick with Instead of <v-jsf :key="nextkey"> This way it is not needed to use this |
if you change both schema and data, fields are rendered properly but data is not shown (all fields show empty value).
Check this codepen: https://codepen.io/fcordova/pen/GRgZmRz
If you first click 'LOAD DATA 1' form is shown perfectly, but once you click 'form data 2' the form is rendered empty. If you reload the page and begin with data 2, it's also rendered fine but then data 1 can't be rendered anymore.
The text was updated successfully, but these errors were encountered: