rowEdit cancel not working as expected with row validation #12189
Labels
🐛 bug
Any issue that describes a bug
grid: row-editing
✅ status: resolved
Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Description
When the
rowEdit
event is canceled, the row's new data is cleared, however the cells' edit values remain. This is not related to the validation feature and is visible in the "Event cancelation" demo in the docs:In a grid validation scenario, it is expected that canceling the
rowEdit
event prevents the user from adding/editing an invalid row.However, due to the above behavior, the grid accepts an invalid row.
To an extent related to #12127.
Steps to reproduce
ProductName
andCategoryName
fields are requiredProductName
fieldDone
in attempt to finalize the row edit while theCategoryName
field is left emptyProductName
cell's value reset. (At this point, if you double click onProductName
you will see its edit value remains as before clickingDone
)CategoryName
Done
Result
The row is added, however, with an invalid state, event though the
rowEdit
event is canceled with the intention not to add/edit an invalid row:Expected result
Reset the cell edit values to the cells' previous values when row editing is canceled?
Properly recalculate the row's validity state.
Attachments
The text was updated successfully, but these errors were encountered: