modular-forms
modular-forms copied to clipboard
more critical bugs - this time getvalue on object
https://playground.solidjs.com/anonymous/4221f2ef-06b4-46da-9594-a8c1caabc357
This is very dangerous, returns old values
- Click mutate
- Click 'show'
- Expect 'def' get 'abc'
Reached the point where we rapidly loosing confidence in any correctness.
Thanks for the info. As soon as I have some more time, I will have a look at the problem.
I'm working around it at the moment by using the deepest path to extract values, but honestly we've got part of the app that at least I've lost complete confidence in that were written weeks ago, users noted strange behavior that we couldnt reliably produce and even when we did we blamed a HMR glitch or something else and carried. Im looking at ripping it all out as I really fail to see how it's usable in it's current state if something as trivial as this repo is breaking it. People aren't putting it through anything serious at the moment I guess. I understand your time is limited and this is FOSS but it may be necessary to attach a warning, no nesting, no nested arrays, no nested objects or something until v2.0. This is going kill any non here's a todo-app reputation I believe.
In practice, I haven't encountered any of these problems yet and as you can see in our playground on the website, the library also works with nested and dynamic forms. With v0.X the library is still in beta. I plan to fix all the bugs and release v1 by the end of this year. Which version of Modular Forms are you using?
This will pull the latest on the playground I believe, but in our setup we're using 0.19.1 right now as upgrading was first attempted, but same result in 0.17
Thank you! I am now aware of the problems that currently exist with Solid, Preact and React for initial values with dynamic field arrays and getValues. In the long term I will find a solution for this. Unfortunately, I can't help you in the short term. Sorry for that.
Do your problems occur even if the fields are rendered properly, as in this example? You can use this StackBlitz project to try it out.
We dont render via Field all properties, but yes it is the same dangerous story https://playground.solidjs.com/anonymous/f71bc588-9a66-4185-b30e-0ef9ee8e2a50
Seems to work for me without problems: https://playground.solidjs.com/anonymous/dd0d0239-9a3d-43bd-b2e0-4ce840b7104d
Okay, different approach there, we probably need an interim warning that every field needs to bound (regardless of shouldactive) and nested arrays that binding needs to happen via FieldArray (as x.0.y doesnt work other than reading original value). For us we can probably do this in a portal somewhere off the view I guess or just display:none it.. This is definitely behavior that will lead people to assume it's broke, even if they don't raise the issue, making minimal reproductions is beyond 95% of people I think (statistics made up on the spot :rofl: )
Yes. I will try to solve these problems in the long term. I the version for Qwik there should be no problems in this regard, because the fields are not initialized lazy.