I have a list of contacts that sencha touch is displaying in a list. Then when you click a name in the list it should slide to the right and say Hello {contact name}! but wh
itemtap: function(view, index, item, e) {
var rec = view.getStore().getAt(index);
ListDemo.detailPanel.update(rec.data);
}
That's how I got it to work.
The first argument passed to the itemtap event isn't the record of the List item tapped, it's the DataView itself.
From the docs:
itemtap : ( Ext.DataView this, Number index, Ext.Element item, Ext.EventObject e ) Fires when a node is tapped on
Listeners will be called with the following arguments: this : Ext.DataView The DataView object index : Number The index of the item that was tapped item : Ext.Element The item element e : Ext.EventObject The event object
You can grab the tapped record by using:
dataView.store.getAt(index); // where 'dataView' is 1st argument and 'index' the 2nd