PDA

View Full Version : Infinity scroll grid doesn't show first row anymore



joseph.piron
31 Jan 2012, 3:30 PM
Hi,

I am developing what I hope will be a comprehensive dashboard for some process but I ran into some trouble:

I set up an infinite scrolling grid in my application, following
http://www.sencha.com/blog/infinite-grid-scrolling-in-ext-js-4
and
http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/infinite-scroll.html

Now, I tried in Safari, Chrome and Firefox (up to date) and it finally scrolls, but I can't scroll back to see the first row of the grid (sometimes the first rows ~4,10,20.., it depends how fast I scroll using the trackpad). This doesn't happen with the example in dev.sencha.

For info, I create my views/controllers/store with the mvc pattern and in my example, I have two views (2 grids) in the viewport with a border layout (infinite in south, paginated in center).

Could someone point me what's wrong ?
Thanks in advance !

Farish
31 Jan 2012, 11:49 PM
I also encountered the same problem. If you are using rowEditing plugin on this grid, you can scroll up using cursor keys (which doesnt change the view) to the top record and press Enter to start editing. this will then make the top records visible but the scrolling doesn't work properly. Then I gave up and started using paging.

joseph.piron
1 Feb 2012, 12:47 AM
Thanks for the tip ! :)
Indeed that's quite annoying, I am not yet ready to give up... yet.
What I do not yet understand is why it works with the example from dev.sencha.

Could we have the feedback from a sencha developer ?

Farish
1 Feb 2012, 1:14 AM
Here is another thread about infinite grid scrolling problems:

http://www.sencha.com/forum/showthread.php?132642-Buffered-Store-with-infinite-grid-scrolling-issues

and apparently it will be fixed in 4.1.0 but I dont have the option to move my application to 4.1.0. there are too many bugs in it and everything will need to be tested again.

vadimv
1 Feb 2012, 1:55 AM
For me it works with a workaround, http://www.sencha.com/forum/showthread.php?173272-bug-with-buffered-scrolling-in-grid

joseph.piron
1 Feb 2012, 6:28 AM
Vadimv, thanks for the support, it works with firefox, but not chrome nor safari.. quite annoying. :(

joseph.piron
1 Feb 2012, 6:30 AM
No in fact it does not work with firefox either... :(

vadimv
1 Feb 2012, 8:56 AM
No in fact it does not work with firefox either... :(

:-? I'm on 4.0.7 and works for all browsers on Mac and Win....

joseph.piron
17 Apr 2012, 3:32 AM
Just to be sure, although it is quite simple, that I'm not committing a code crime :)


Ext.define('M.store.LatestOccurences', { extend: 'Ext.data.Store',
model: 'M.model.Occurence',
requires: 'M.model.Occurence',

pageSize: 200,
buffered: true,

proxy: {
type: 'rest',
url: '/gateway/default/api/occurences.json?order=-appearedAt',
reader: {
type: 'json',
root: 'result',
totalProperty: 'total'
}
},
});

and the view:


Ext.define('M.view.occurence.Latest', { extend: 'Ext.grid.Panel',
alias: 'widget.latestoccurences',
store: "LatestOccurences",

initComponent: function(){
var config = {
frame: true,
verticalScrollerType: 'paginggridscroller',
loadMask: true,
invalidateScrollerOnRefresh: false,

columns: [
{header: 'Apparition Time', dataIndex: "appearedAt", flex: 1},
{header: 'Disparition Time', dataIndex: 'disappearedAt', flex: 1},
{header: 'Message', dataIndex: 'message', flex: 4}
]
}
Ext.apply(this, config);

this.callParent(arguments);
},
});

I have upgraded firefox and safar, but still does not work, not showing first rows (1-5) when I scoll back up. It is really annoying because I'd like to have this updated each minutes or so moreover :)

vadimv
17 Apr 2012, 6:36 AM
what version are you using ?, if is 4.0.7, then try to switch to 4.1 which should have the fix, currently it's RC3 and seems to be already stable.

joseph.piron
17 Apr 2012, 6:57 AM
I'm with 4.0.7, I can try with 4.1 but is it available as a non commercial download ?