Required field validation displays on clicking Delete row button
Required field validation message displays on clicking the 'Delete row' button. However, the row is deleted on second click of the button.
Value cannot be blank
Steps to Reproduce
- Configure a section with a repeating grid which is sourced from a Page List property
- Set two fields to display in the repeating grid. One of the fields should be a required field
- Click the 'Add row' button
- Click the 'Delete row' button. Validation message displays
When a field is Required and the focus moves out without providing any value then validation occurs and this is an expected behavior.
On adding a row, the first element in the row has the focus which is a Required field, and even on clicking 'Delete row', validation should be completed. Deletion does not occur for the first time, because the button shifts below due to the addition of the error message in Document Object Model (DOM).
ResolutionPerform the following local-change:
- Add a column with the Delete row button
- Add the 'delete item' action on the button
- Include an inline style for the grid column as below:
vertical-align: top;padding-top: 18px;