FIO-10201: fixed an issue where validation is triggered for components inside conditionally hidden editGrid#262
Merged
brendanbond merged 2 commits intomasterfrom Jun 10, 2025
Conversation
…s inside conditionally hidden editGrid
…-for-field-inside-hidden-editGrid
brendanbond
approved these changes
Jun 10, 2025
Contributor
brendanbond
left a comment
There was a problem hiding this comment.
I don't really love this, but I think we've painted ourselves into a bit of a corner on this. Ideally, eachComponent and eachComponentData just shouldn't have side effects at all.
lane-formio
pushed a commit
that referenced
this pull request
Jul 3, 2025
…s inside conditionally hidden editGrid (#262)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Link to Jira Ticket
https://formio.atlassian.net/browse/FIO-10201
Description
What changed?
The getComponentValue inside the simple conditionals check uses the getComponentFromPath that uses the eachComponentData. The eachComponentData resets the scope for each form component. The scope is needed for child components to define if parent is hidden or not. So, the child components of the conditionally hidden components are not considered to be hidden when scope is unavailable and the validation is triggered for them.
The getComponentValue (the same as getComponentFromPath) should not have any side affects. This PR makes the scope reset optional inside eachComponentData.
How has this PR been tested?
manually + tests
Checklist: