Hi All,
Below is the code of deleting the records but the first time(after the page reload) deleting a record it has no issue. But when I delete the another record, the store tried to delete it and previous deleted record which cause an error message because the previous doesn't exist.
Don't know how to clear the remove cache or what I should do to prevent the second deletion won't delete the previous record.
Thanks in advance,
Kim
Delete from Rest Store keep deleting previous deleted records again
Below is the code of deleting the records but the first time(after the page reload) deleting a record it has no issue. But when I delete the another record, the store tried to delete it and previous deleted record which cause an error message because the previous doesn't exist.
Don't know how to clear the remove cache or what I should do to prevent the second deletion won't delete the previous record.
Thanks in advance,
Kim
text: 'Delete',
itemId: 'sa-delete',
disabled: true,
handler: function(b, e) {
var selected = this.getSelectionModel().selected;
Ext.Msg.confirm(this._t('Delete User'), this._t('Delete this User'), function(button) {
if (button === 'yes') {
this.store.remove(selected.items);
this.store.sync({
success: function() {
this.fireEvent('deleted', selected.items);
},
scope: this
});
}
}, this);
Delete from Rest Store keep deleting previous deleted records again
Aucun commentaire:
Enregistrer un commentaire