PDA

View Full Version : [FIXED-215] Store add method broken



meyerovb
11 Aug 2010, 6:31 AM
The below code produces a list with 2,1,3,4. Clicking on 3 alerts 4, clicking on 4 alerts 3 (1 & 2 alert correctly).



Ext.setup({ onReady: function () {
var list = new Ext.List({
fullscreen: true,
store: new Ext.data.Store({ fields: ['i'] }),
tpl: new Ext.XTemplate('<tpl for="."><div class="list-item">{i}</div></tpl>'),
itemSelector: '.list-item',
listeners: {
itemtap: function (list, index, item) {
alert(list.getStore().getAt(index).data.i);
}
}
});
list.getStore().add({ i: 1 }, { i: 2 });
list.getStore().add({ i: 3 }, { i: 4 });
}});

Jamie Avins
11 Aug 2010, 9:51 AM
Thank you for the report.

edspencer
3 Sep 2010, 6:21 PM
I've added a series of unit tests exercising this behavior and all are passing correctly so I'm closing this ticket.