You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When there are invalid entries in some of the rows of an inner edit grid of a parent edit grid, we will notice that if we enable the validations for the given form then we will see that the links in the alerts will point to a relative path that once clicked it will redirect to the last row of the inner edit grid of the last row of the parent edit grid.
Version/Branch
latest 4.19
To Reproduce
Steps to reproduce the behavior:
Create a form that contains the following:
Parent edit grid that allows draft rows with invalid input;
Each entry of the parent edit grid to contain an inner edit grid that allows draft rows with invalid input;
Each entry of the inner edit grid to have an input text field with any given validation required or custom.
Add a button that once clicked it will display the validation errors of the form
Add new entry in the parent edit grid, with two new inner edit grid entries where the first one has an invalid input and the second is valid
Add another new entry in the parent edit grid only this time, we add a valid entry in the inner edit grid
Save all rows
Click the button to validate the form
Click on one of the inner grid messages that point to a relative path to the inner edit grid sections(Not the input field message but the one that is referring to invalid rows of the inner edit grid)
See that you are redirected to the valid entry of the last row of the parent edit grid, of the last inner edit grid component
Expected behavior
Every link should point to each individual path of the given component and not redirect to the last entry of the edit grid as this creates confussion
Describe the bug
When there are invalid entries in some of the rows of an inner edit grid of a parent edit grid, we will notice that if we enable the validations for the given form then we will see that the links in the alerts will point to a relative path that once clicked it will redirect to the last row of the inner edit grid of the last row of the parent edit grid.
Version/Branch
latest 4.19
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Every link should point to each individual path of the given component and not redirect to the last entry of the edit grid as this creates confussion
Context
The above scenario can be reproduce on https://formio.github.io/formio.js/app/sandbox with the following details:
{ "display": "form", "components": [ { "label": "Edit Grid Parent", "tableView": false, "validate": { "required": true }, "rowDrafts": true, "key": "editGridParent", "type": "editgrid", "displayAsTable": false, "input": true, "components": [ { "label": "Edit Grid Child", "tableView": false, "validate": { "required": true }, "rowDrafts": true, "key": "editGridChild", "type": "editgrid", "displayAsTable": false, "input": true, "components": [ { "label": "Text Field", "applyMaskOn": "change", "tableView": true, "validate": { "required": true }, "key": "textField", "type": "textfield", "input": true } ] } ] }, { "label": "Validate", "action": "saveState", "showValidations": true, "tableView": false, "key": "validate", "type": "button", "input": true, "state": "draft" }, { "type": "button", "label": "Submit", "key": "submit", "disableOnInvalid": true, "input": true, "tableView": false } ] }
{ "data": { "editGridParent": [ { "editGridChild": [ { "textField": "" }, { "textField": "the one with issue" } ] }, { "editGridChild": [ { "textField": "not the one with the issue" } ] } ], "validate": true, "submit": false }, "metadata": { "timezone": "Europe/Chisinau", "offset": 180, "origin": "https://formio.github.io", "referrer": "https://github.com/formio/formio.js/issues/5560", "browserName": "Netscape", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", "pathName": "/formio.js/app/sandbox", "onLine": true }, "state": "draft", "_vnote": "" }
The text was updated successfully, but these errors were encountered: