Thank you for reporting this bug. We will make it our priority to review this report.
Empty grid line not fully visually reinstated if backend delete fails
Empty grid line not fully visually reinstated if backend delete fails
TLDR If an *empty* grid line fails to delete in the backend then it is not visually returned to its original appearance. The line becomes half as thick as before, ie this is a cosmetic bug.
I have a simple grid panel backed by a DB and JSON. I use RowEditing however I dont think this is required to provoke the bug. The grid has only 1 column and this can be blank.
If a grid line is deleted then it immediately disappears from the screen. If the DB response indicates failure {"success":false} then AFAIK the following code is required in the store (or similar) to get the line back on the screen (as though nothing happened).
Code:
onDestroyRecords: function(records, operation, success) {
if (success) {
this.removed.length = 0;
} else {
//var removedRecords = this.getRemovedRecords();
this.rejectChanges();
//var removedRecords2 = this.getRemovedRecords();
}
}
(Now assuming my above code is correct. Please let me know if its wrong)A failed delete is handled correctly for lines that contain something. But empty lines reappear at only half thickness.
Peter
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
the field contains a zero length string.
Also similar on update
halfthichness.PNG
and here it is in all its glory (the selected line below the line containing "Cool patterns")
Empty grid line not fully visually reinstated if backend delete fails
Aucun commentaire:
Enregistrer un commentaire