When the DataGrid component has the default 1st row, we can find some fields already have empty values in JSON. This is a reason why the calculated value doesn't apply for DataGrid with allow override. I tried to change this logic and save DataGrid with an empty array without nested fields. As a result, it caused a lot of tests to fail and can be an issue with the compatibility of existing forms. So I changed the isEmpty method for DataGrid to skip default empty fields and apply calculated value.
How has this PR been tested?
Unit testing
Checklist:
[x] I have completed the above PR template
[ ] 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
Link to Jira Ticket
https://formio.atlassian.net/browse/FIO-4871
Description
When the DataGrid component has the default 1st row, we can find some fields already have empty values in JSON. This is a reason why the calculated value doesn't apply for DataGrid with allow override. I tried to change this logic and save DataGrid with an empty array without nested fields. As a result, it caused a lot of tests to fail and can be an issue with the compatibility of existing forms. So I changed the isEmpty method for DataGrid to skip default empty fields and apply calculated value.
How has this PR been tested?
Unit testing
Checklist: