fix 3711 anyOf/oneOf remove old fields from previous schema#3714
fix 3711 anyOf/oneOf remove old fields from previous schema#3714cwendtxealth wants to merge 2 commits intorjsf-team:mainfrom
Conversation
| }); | ||
|
|
||
| newFormData = { | ||
| ...data, |
There was a problem hiding this comment.
@cwendtxealth These changes are very similar to #3443 (comment). In that PR I requested the developer to ensure that none of the other issues were regressed. Are you willing to do that legwork?
There was a problem hiding this comment.
Yeah I should be able to validate those issues if they have reproducible steps
There was a problem hiding this comment.
Just from some initial testing it does look like removing some undefined fields causes some issues with how getDefaultFormState fills out formData. Might need to look at a different place to remove the undefined fields.
There was a problem hiding this comment.
@cwendtxealth I'm on vacation for a week starting today. My thoughts are that, perhaps we add another flag to the experimental_defaultFormStateBehavior that deals with this behavior somehow.
There was a problem hiding this comment.
Maybe we talk about this at one of the Friday meetings?
There was a problem hiding this comment.
That sounds good!
|
Hello, any update on this fix? Thanks! |
|
@linpc This is a very tricky problem that @cwendtxealth hasn't quite figured out how to fix yet. |
|
Hey @cwendtxealth, @heath-freenome , any predictions on when this might get merged? No pressure, but our workaround for this is giving us some performance issues, so we need to decide if it's worth optimizing. |
|
Hi @michal-kurz , would you mind sharing your workaround? |
|
thank you all, just a doubt: it will work on conditionally remove a field with "if" without anyOf or oneOf? |
|
Thanks for contributing this, I believe it would fix my issue raised in #4366 |
|
@cwendtxealth Any chance you can figure out 1) whether this PR is still needed given all the changes and features added to v6? and 2) if so, how can we help you get it over the line? |
Reasons for making this change
Fixes #3711 - removing old undefined fields when switching to different oneOf/anyOf schema
Checklist
npm run test:updateto update snapshots, if needed.