View Full Version : [CLOSED] List.update() not resetting scroll position

2 Jan 2012, 3:41 AM
suppose I had a lot of data in my list, and I scrolled to its bottom,
now list.update(someData) is called where someData has very few items, than I might not see the items in the list as it is scrolled to it's previous length bottom
so, I'd expect list.update to reset the scroll position

a workaround would be to
1. extend the Ext.List
2. override the update function to look like this:

update: function(data) { this.getStore().loadData(data);
if (this.rendered) {
this.scroller.scrollTo({x:0, y:0});

calling the superclass.update ruins the doComponentLayout... (although fixing the scroll position)

2 Jan 2012, 6:54 AM
This has been fixed in Sencha Touch 2.