Tuesday 6 August 2013

Unhide items in list in sencha programatically

Unhide items in list in sencha programatically

I have a list set by a store and styled by an itemtpl in sencha like so:
xtype: 'list',
id: 'messageList',
store: 'messageStore',
itemTpl: mytemplate
Each list item has an handler on itemtap and itemswipe. Itemswipe does a
slide animation to expose a delete button hidden off to the left with some
css trickery. I have no problem doing the animation the problem I have is
when one item is slid out, if another item is slid out i would like to
slide the other item back into place.
I had thought that this would work :
var store = Ext.StoreMgr.get('messageStore');
store.data.items[index].data.Slidout = true;
for (var i = 0; i < store.data.items.length; i++){
if (store.data.items[i].data.Slidout == true){
var items = Ext.getCmp('messageList').items;
//unhide items[i]
}
}
What I'm essentially asking is how to access the items in the list so I
can fire an animation on them programatically.

No comments:

Post a Comment