If a row is edited in the GridComponent and it has errors (e.g. a mandatory field is not filled), it is possible to change the row and the GUI gets into an inconsistent state:
- Correctly, a message appears that cannot be saved.
- The old row still shows fields, but is no longer selected.
- The new row is selected, but does not offer any fields.
Further specification
If a composition reference is displayed as a column of a grid component, it can be edited inline via "Display values". If input errors are made (e.g. mandatory fields left empty) and the dialog is closed, an error symbol is displayed in the column and the row object cannot be saved because "an inner field has an error":
Problem
If in this situation the "Save" function is not explicitly used, but the row is simply changed (which normally saves implicitly), the new row is selected without edit mode, but the display of the previously selected row is not updated, so it is still displayed in edit mode. If you exit the edit mode by pressing "Cancel", the display of the previously selected line will still not be updated and it will still be displayed in edit mode:
If you now switch back to edit mode to edit the newly selected line, both lines will be displayed in edit mode:
Shall
A line change should either be impossible until the error has been corrected by correcting or discarding the input, or the input must be automatically discarded when the line is changed, or at least when canceling, the edit mode must also be terminated for non-selected lines.
Test
- TestGridSelection-04_TestChangeSelectionInErrorState.script.xml
- Manual:
- Change to Structures> Type Demo > Grid.
- Edit an A and empty the name.
- Expectation: The line has an error
- Click on another line.
- Expectation: It is not possible to change the line. The old line is still edited and has the old error. Only the edited line is selected.
- Select the selection checkbox of another line.
- Expectation: It is not possible to change the line. The old line is still edited and has the old error. Only the edited line is selected.