I'm working with version 1.01a. I have worked with localstorage it seems add and remove is working for me, some time i came across a problem but i couldn't able to recreate it
Below mention code works for me, let me know if any problem occurs
Code:
Ext.setup({
onReady: function() {
Ext.regModel('Contact', {
fields: ['email'],
proxy:{
type:'localstorage',
id :'contact'
}
});
var contactStore = new Ext.data.Store({
model:'Contact',
getGroupString : function(record) {
return record.get('email')[0];
},
autoLoad:true
});
var mainPanel = new Ext.Panel ({
fullscreen:true,
scroll:false,
dockedItems:[{
xtype:'toolbar',
items:[{text :'Disclosure to Remove'},{xtype:'spacer'},{
text:'Add to Local Storage',
handler:function(){
Ext.Msg.prompt("Welcome!", "Enter Email", function(stat,val){
if(stat == "ok"){
if(contactStore.findExact('email',val) == -1){
contactStore.add({email : val});
contactStore.sync();
}
}
});
}
}]
}],
items:[{
xtype:'list',
fullscreen: true,
itemTpl : '{email}',
onItemDisclosure: {
handler: function(record, btn, index) {
contactStore.remove(contactStore.findRecord('email',record.get('email')));
contactStore.sync();
}
},
grouped : true,
indexBar: false,
store: contactStore
}]
});
}
});