-
10 Aug 2010 11:16 AM #1
[FIXED-212] List not reducing scroll position after reload
[FIXED-212] List not reducing scroll position after reload
In the code example below, scroll down in the list, then press the button. The list appears empty, but if you scroll back up you'll see the new element (and subsequently you will not be able to scroll down again). Expected behavior would be for the container to scroll so it's lower limit matches the bottom of the screen (if it still overflows). My workaround is to scroll manually after reloading the data, let me know if there's another workaround for now.
Code:Ext.setup({ onReady: function () { var data = []; for (var x = 0; x < 100; x++) data[data.length] = { html: x }; new Ext.List({ fullscreen: true, store: new Ext.data.Store({ fields: ['html'] }), tpl: new Ext.XTemplate('<tpl for="."><div class="list-item">{html}</div></tpl>'), itemSelector: '.list-item', dockedItems: [{ dock: 'top', xtype: 'button', text: 'shorten list', handler: function () { this.ownerCt.getStore().loadData([{ html: 'invisible'}]); } }] }).getStore().loadData(data); }});
-
11 Aug 2010 9:39 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Thanks for the report.
-
15 Sep 2010 5:26 PM #3
Fixed in 0.96.
Aaron Conran
@aconran
Sencha Architect Development Team
-
31 Mar 2011 12:11 AM #4
does't work in v1.1
does't work in v1.1
Hello,
I have same problem. It does't work in sencha 1.1
-
31 Jan 2012 10:34 PM #5
Code:Ext.override(Ext.DataView,{ refresh: function() { if (!this.rendered) { return; } this.fireEvent('beforerefresh', this); var el = this.getTargetEl(), records = this.store.getRange(); el.update(''); if (records.length < 1) { if (!this.deferEmptyText || this.hasSkippedEmptyText) { el.update(this.emptyText); } this.all.clear(); } else { this.tpl.overwrite(el, this.collectData(records, 0)); this.all.fill(Ext.query(this.itemSelector, el.dom)); this.updateIndexes(0); } this.hasSkippedEmptyText = true; if (this.scroller) { this.scroller.scrollTo({x:0, y:0}); } this.fireEvent('refresh', this); } });
You found a bug! We've classified it as
a bug in our system.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
Similar Threads
-
[FIXED] List scroll issue
By kostik83 in forum Sencha Touch 1.x: BugsReplies: 2Last Post: 19 Jul 2010, 9:59 AM -
Saving scroll position after store reload (difference in 3.0 and 3.0.3)
By marcink86 in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 17 Nov 2009, 1:59 AM -
[OPEN] [FIXED-212][3.0.0] Text not localized
By hanne in forum Ext 3.x: BugsReplies: 1Last Post: 1 Sep 2009, 7:44 AM -
Scroll scroll scroooolllll at a fixed position !!!
By j-mi-jim in forum Community DiscussionReplies: 0Last Post: 12 Feb 2009, 6:49 AM -
Setting the scroll state of a form to a fixed position on load
By kevinmike in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 10 Feb 2009, 12:23 PM


Reply With Quote