Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    2
    Vote Rating
    0
    Yu- is on a distinguished road

      0  

    Default [4.2.0/4.2.1 beta] infinite grid's store's currentPage is wrong?

    [4.2.0/4.2.1 beta] infinite grid's store's currentPage is wrong?


    REQUIRED INFORMATION
    Ext version tested:
    • Ext 4.2.0
    • Ext 4.2.1 beta
    Browser versions tested against:
    • FF 20.0.1
    Description:
    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:
    Code:
    XXX?page=1&start=0&limit=1000&sort=elem_ets&dir=DESC
    Scrolling down to any page:
    Code:
    XXX?page=105&start=104000&limit=1000&sort=elem_ets&dir=DESC
    Calling store.load(), which should call page=105 if i understand it right:
    Code:
    XXX?page=1&start=0&limit=1000&sort=elem_ets&dir=DESC
    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?

    Thank you.

    -- yu

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,062
    Vote Rating
    215
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    2
    Vote Rating
    0
    Yu- is on a distinguished road

      0  

    Default


    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.

    Thanks.

  4. #4
    Sencha Premium Member
    Join Date
    Feb 2013
    Location
    Virginia
    Posts
    11
    Vote Rating
    0
    YuraSocolov is on a distinguished road

      0  

    Default Still broken in 4.2.2

    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.

  5. #5
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    4,082
    Vote Rating
    69
    Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about

      0  

    Default


    The bug ticket associated with this thread has been closed -- apologies for the disconnect. Here's the comment from the developer:
    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.
    I've updated the status on this thread.


    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager:
    sheryl@sencha.com

  6. #6
    Sencha Premium Member
    Join Date
    Feb 2013
    Location
    Virginia
    Posts
    11
    Vote Rating
    0
    YuraSocolov is on a distinguished road

      0  

    Default


    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.