formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.88k stars 1.06k forks source link

FIO-4871 fixed calculated value issues #5503

Closed roma-formio closed 7 months ago

roma-formio commented 8 months ago

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-4871

Description

In this PR fixes for several issues:

  1. DataGrid with the 'Initialize Empty' setting doesn't add calculated rows to the form so DataGrid is always empty.
  2. Only the first component inside NestedComponent can recalculate value.
  3. DataGrid can restore calculations after values have been changed manually by resetting values to the previous calculated value.
  4. EditGrid trigger calculate value in builder mode.

How has this PR been tested?

Unit testing, manual testing.

Checklist: