How to scroll by default to a specific item of Ext.List in Sencha Touch 2.1
I want to scroll to top of a specific item in a list when it first load, what I did in 2.0 is to sum the height of all the items on top of that specific item I want to scroll to and get the scroller of the list and set the default scroll of it using scrollBy method that has a parameter of Y axis in which I have passed the accumulated height. Now in 2.1 the list implementation is changed I can't sum the height of the items because the dom is resused and there is only a fix number of item that I can hold on unlike before that the whole list is rendered. Is there a any suggested way to do this maybe some type of cursor in the store so the list knows where to scroll by default?
Sencha Premium Member
Perhaps you could try to use setActiveItem(item)? That should set an item in the list active, though I'm not sure if it will scroll to it as well.
Tags for this Thread