formio / formio.js

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

Delete row in datagrid causes error #5454

Open daspilker opened 7 months ago

daspilker commented 7 months ago

We are currently using FormIO 4.18.0.

When adding multiple rows to a data grid and deleting any but the last row, the following error is logged to the console and the row is not deleted.

core.mjs:10614 ERROR TypeError: Cannot read properties of undefined (reading 'getComponentPath')
    at DataGrid.js:397:54
    at Array.forEach (<anonymous>)
    at DataGridComponent.updateComponentsRowIndex (DataGrid.js:389:20)
    at DataGrid.js:402:18
    at Array.forEach (<anonymous>)
    at DataGridComponent.updateRowsComponents (DataGrid.js:401:35)
    at DataGridComponent.removeRow (DataGrid.js:410:14)
    at _ZoneDelegate.invokeTask (zone.js:402:31)
    at core.mjs:10757:55
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:10757:36)
daspilker commented 7 months ago

This has been resolved by updating to @formio/angular v7.0.0 and formiojs 4.18.1.

radovan-jupa commented 2 months ago

This issue was not resolved. I can reproduce this bug in version @formio/js 5.0.0-rc.62

olgabann commented 1 month ago

@daspilker Thank you for reporting this issue. I can reproduce it and have logged a ticket for the backlog. We are always willing to review any contributions from the open-source community to resolve this issue.

For internal reference: FIO-8710