Previously, formio.js conditionals were failing with error / not working in scenarios when conditions were applied to array data structure components (Edit Grid, Data Grid, etc.). This PR fixes this behavior.
Why have you chosen this solution?
Tried different solutions, but since this logic never really worked fine, ended up writing a recursive function that would generate array of components paths with indexes, which are later iterated one by one to perform conditional checks.
Dependencies
None
How has this PR been tested?
I added automated tests to cover both tickets cases, also performed a good batch of manual tests through portal
Checklist:
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation (if applicable)
[x] My changes generate no new warnings
[x] My changes include tests that prove my fix is effective (or that my feature works as intended)
[x] New and existing unit/integration tests pass locally with my changes
[ ] Any dependent changes have corresponding PRs that are listed above
!!! PR for 4.19.x branch, there's a separate for 5.x branch
Link to Jira Ticket
https://formio.atlassian.net/browse/FIO-8389 https://formio.atlassian.net/browse/FIO-8403 https://formio.atlassian.net/browse/FIO-8414
Description
What changed?
Previously, formio.js conditionals were failing with error / not working in scenarios when conditions were applied to array data structure components (Edit Grid, Data Grid, etc.). This PR fixes this behavior.
Why have you chosen this solution?
Tried different solutions, but since this logic never really worked fine, ended up writing a recursive function that would generate array of components paths with indexes, which are later iterated one by one to perform conditional checks.
Dependencies
None
How has this PR been tested?
I added automated tests to cover both tickets cases, also performed a good batch of manual tests through portal
Checklist: