Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-989 in a recent build.
  1. #1
    Ext JS Premium Member simeon's Avatar
    Join Date
    Mar 2007
    Location
    Austin, Texas
    Posts
    227
    Vote Rating
    1
    simeon is on a distinguished road

      0  

    Default scroll position not reset after store loads second page of results

    scroll position not reset after store loads second page of results


    I have a paginated store.

    If I scroll to the bottom of the page and then load the next page of results. The scroller view does not reset its position to the top of the view. It stays where it was (at the bottom). I would expect the view scroller to reset to the top.

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    How are you loading the next page of results?

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    125
    Vote Rating
    0
    oddz is on a distinguished road

      0  

    Default


    This is a related question so I thought it would be best to place it here but how does one access the scroller of a container and set the position manually?

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Posts
    125
    Vote Rating
    0
    oddz is on a distinguished road

      0  

    Default


    This is not documented anywhere but the scroll position can be set like so where the first argument is the x position and second the y.

    view // view instance
    .getScrollable() // scroll view instance
    .getScroller() // scroll instance
    .scrollTo(0,100); // scroll 100px down

    Searching for scrollTo in the documentation nothing is found – bug?

  6. #6
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    DataView/List will now reset the scroller back to 0,0 whenever the reset method is called (triggered from load, sort, filter on the store). Manual calls to loadRecord should clear it as well since the clear event from store will remove all items and set the size back to zero before it adds in the new items.

    Sencha Inc

    Jamie Avins

    @jamieavins

Thread Participants: 2