angular icon indicating copy to clipboard operation
angular copied to clipboard

[BUG] datagrid validation malfunctioning

Open imshivamchauhan opened this issue 7 years ago • 4 comments

Environment

Please provide as many details as you can:

  • Hosting type
    • [x] Form.io
  • Formio.js version: latest
  • Frontend framework: MEAN, angular-formio
  • Browser: chrome, mozilla
  • Browser version: latest

Steps to Reproduce

  1. Add DataGrid to form & add some text, select component with required validation in it & save the form.
  2. On submit button setting, untick the disabled on form invalid checkbox.
  3. Now open the above form in renderer, fill first row in datagrid with valid data.
  4. Click on add another row, and now Remove that same row, now hit submit.

Expected behavior

It should submit the form properly.

Observed behavior

Its showing validation errors for the deleted row also & stopping form from submitting. @travist @randallknutson

imshivamchauhan avatar Sep 20 '19 13:09 imshivamchauhan

@imshivamchauhan Thank you for the report. We were able to replicate this issue on our end as well and have created a ticket for the issue. We will review during our planning meeting next week. Please note, we welcome pull requests in this library. If you need this item expedited, please feel free to contact [email protected] for pricing.

jeriah-formio avatar Sep 20 '19 13:09 jeriah-formio

I guess in Datagrid.js "removeRow" function you have to splice this.components as well to fix this

sanjaykrgaur avatar Sep 22 '19 18:09 sanjaykrgaur

@sanjaykrgaur if you have an idea where to resolve this issue, please submit a pull request with your change and we will take a look.

travist avatar Sep 23 '19 14:09 travist

This issue has been resolved on the latest version of formio.js

jeriah-formio avatar Oct 28 '19 15:10 jeriah-formio