formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

[BUG] checkValidity fails to validate Datagrid when deleting any row except the last one

Open celu opened this issue 10 months ago • 3 comments

Describe the bug If checkValidity function is called after deleting middle rows in Data grid component with required fields, the last row is not marked as required and displayed as red.

Version/Branch Formiojs v5.0.1

To Reproduce Steps to reproduce the behavior:

  1. Create form with dataGrid, adding a required text field.
  2. Render the form, with a button that calls the function checkValidity (https://help.form.io/developers/form-development/form-renderer#form.checkvalidity-data-dirty-row-silent)
  3. Use the form and add multiple rows, all without data filled.
  4. Call checkValidity(null, true, null, false) is called all rows are marked as error in red
  5. Delete a middle row (not last one).
  6. Recall the function checkValidity(null, true, null, false) and the last row is not marked as red (required) causing a bug.

Expected behavior All rows should be marked as required and red when checkvalidity function is called despite removing a middle row, last row should be marked as an error one.

Screenshots alt text

Additional context The bug is also present in other legacy versions https://formio.github.io/formio.js/app/builder

celu avatar Feb 05 '25 16:02 celu

Hi, @celu . Thank you for reporting this issue. I am able to reproduce 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-10031

Victoriya25 avatar Apr 21 '25 09:04 Victoriya25

Hello @Victoriya25 ,

Is there already any timeline of when this issue will be resolved?

celu avatar May 16 '25 08:05 celu

Hello @celu ! The ticket is in the backlog. We appreciate your patience while the team works on it.

Victoriya25 avatar May 19 '25 09:05 Victoriya25