Fixes for embedded FormProvider #3402
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I recently added a few
Summary2
components tottd/frontend-test
which references all the previous tasks. When doing that, I noticed a few errors in DevTools that weren't there before. It turns out that two unanticipated things happened here:Effect*
components were rendered inside the node hierarchy, which caused one of the components to try to setpreselectedOptionIndex
in the database. Since the data model here belonged to a previous task and was locked,FormDataWrite
stopped to attempt with an error. This PR prevents these effects from running at all when in a "read only" state such as rendering for Summary2.FormProvider
.I still have left to check existing apps and who might be affected by this slight change. I should inform app developers that have set up dynamics when using FormProvider embedding, in addition to documenting when doing such doesn't work as one might think.
Related Issue(s)
Verification/QA
kind/*
andbackport*
label to this PR for proper release notes grouping