Saturday, 17 August 2013

Sencha touch IndexBar - get tapped index value

Sencha touch IndexBar - get tapped index value

Am using indexbar in my contact list. I have a list of more than 100
contact so am using pagination plugin to display the contacts. my problem
is when a user tap on index B i have to call an api to get the contacts
starting from letter B, i dont know how to get the tapped index value..
please help me to solve this issue.. I dont have much code to paste..
list = Ext.create('Ext.dataview.List', Ext.Object.merge({
itemTpl: itemTpl,
id:'ctsitemheighttest',
variableHeights: true,
itemHeight : 'auto',
scrollToTopOnRefresh: false,
indexBar : true,
indexBar: {
itemId:'ctsindex',
id:'ctsindex',
margin:1,
handler:function(){
console.log('index tapped'); // can i do this way?
its not working
}
},
}
Please help me..thanks in advance

No comments:

Post a Comment