Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while deleting a row from the data grid #5689

Open
radovan-jupa opened this issue Jul 11, 2024 · 1 comment
Open

Error while deleting a row from the data grid #5689

radovan-jupa opened this issue Jul 11, 2024 · 1 comment

Comments

@radovan-jupa
Copy link

radovan-jupa commented Jul 11, 2024

Describe the bug
If user tries to delete a row from datagrid (except the last one), then error occured and no row was deleted.

Version/Branch
5.0.0-rc.62

To Reproduce
Steps to reproduce the behavior:

  1. Create form with datagrid
    1. Add datagrid component
    2. Add text field to component
  2. Preview the form
  3. Add several rows to datagrid
  4. Remove any row (except the last one)
  5. Error: No row is removed and javascript error in console occurres

TypeError: Cannot read properties of undefined (reading 'getComponentPath')
at formio.full.min.js:2:1193098
at Array.forEach ()
at l.updateComponentsRowIndex (formio.full.min.js:2:1192871)
at formio.full.min.js:2:1193186
at Array.forEach ()
at l.updateRowsComponents (formio.full.min.js:2:1193164)
at l.removeRow (formio.full.min.js:2:1193439)

Expected behavior
If user tries to delete a row from datagrid, then the row is removed without any errors

Additional context
I think that problem is in file /src/components/datagrid/DataGrid.js at line 486 where Components are undefined. It seems like a problem with import - named import vs default import. Same import style is also used in DataMap.js

@olgabann
Copy link

@radovan-jupa 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants