Looks like we can't reproduce the issue or there's a problem in the test case provided.
[4.2.0/4.2.1 beta] infinite grid's store's currentPage is wrong?
Ext version tested:
Browser versions tested against:
I have an infinite grid with a huge amount of rows (> 1M), no filters, checkbox selection model, sorting is done on the server. If I scroll down to any page using either pagedown key or scroll bars, a correct page is fetched from the server and displayed. If I need to refresh the grid, such as after some Ajax-driven server-side operation, I execute grid.getStore().load(). Instead of loading the currently displayed page, or one of the pages that I would think would be in PageMap's cache, the refresh operation always loads page #1 from the server, so the current page effectively is not being displayed.
I've added some debugging console.logs, and it would seem that the store's currentPage is always 1, as opposed to what I think should be the current page. So, it would seem to me that when i'm scrolling the grid, that variable is not being updated properly, hence the subsequent load() calls also don't refresh the right page.
I've tried manipulating various PageMaps variables, using view.refresh() and store.reload() instead of store.load(), but the bottom line is that didn't help and my understanding is that load() should refresh things properly, at least it did in 4.0.7.
Initial grid load:
Scrolling down to any page:
Calling store.load(), which should call page=105 if i understand it right:
A console.log of grid.getStore().currentPage right before the load() call prints 1.
Am I doing something wrong or is this a bug? Is currentPage perhaps only applicable to paged grids and not infinite grids and if so, what's the proper way to refresh the infinite grid?
Thanks for the report! I have opened a bug in our bug tracker.
Is there an estimated time for the fix of any kind or a workaround or an ugly hack, by chance?
I'm well aware of beggars and choosers, so if the answer is no, that's perfectly fine.
Sencha Premium Member
Still broken in 4.2.2
For the record, in case someone is wondering about whether things work in the commercial version of 4.2.2, the answer is no, reloads are still broken.
Release notes are mentioning, EXTJSIV-9991 Grid with Infinite Scrolling - Reload Function, as fixed, which i hoped was either a dupe or the fix would fix this, too, but no such luck.
Basically, buffered infinite grids with huge numbers of records are still unusable.
Update: same in last night's nighly, 1162.
The bug ticket associated with this thread has been closed -- apologies for the disconnect. Here's the comment from the developer:
I've updated the status on this thread.
This isn't a bug. Due to the changes in 4.2, there is no "current" page in the store, the data is stored in a last recently used cache in terms of pages.
Lifecycle management for your web apps
Sencha Premium Member
Ok, then what's the proper way to refresh the records of the current page without jumping to page 1, when i'm scrolled down a few hundred thousand lines?
I suppose this thread needs to be moved to Q&A, then, too.