store.remove() and store.sync() with localhost proxy what I'm doing wrong?
Hi to all,
i have some problems with store.sync() after a store.remove() function
here's my code:
store:
Code:
Ext.define('MyApp.store.MyStore', {
extend: 'Ext.data.Store',
config: {
model: 'MyApp.model.MyModel',
autoLoad: true,
sorters: 'name',
proxy: {
type: 'localstorage',
id: 'mystore'
}
}
});
controllers:
IT WORKS FINE
Code:
MyADD : function() {
//..................
Ext.getStore("MyStore").add(myrecord);
Ext.getStore("MyStore").sync();
mystore.load();
//..................
},
HERE I GET SOME PROBLEMS:
Code:
MyRemove: function() {
//..................
Ext.getStore("MyStore").remove(myrecord);
Ext.getStore("MyStore").sync();
mystore.load();
//..................
},
The problem is:
if i add some records, reload all the app, and remove the records I have non problems,
if i add a records ad them remove it (without reloading the app) this record seems deleted but reappears after another mystore.load() , the records added BEFORE a reload of the app are succesfully deleted, i have this problemo only with remove() and removeall() , no problems with record adding or modifiyng
I already tried to change autoLoad or autoSync proprieties and load/sync manually without results
what I'm doing wrong? :-?