PDA

View Full Version : [FIXED] scroll position not reset after store loads second page of results



simeon
6 Nov 2011, 2:23 PM
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.

Jamie Avins
7 Nov 2011, 8:33 AM
Thank you for the report.

Jamie Avins
7 Nov 2011, 8:53 AM
How are you loading the next page of results?

oddz
7 Nov 2011, 10:44 AM
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?

oddz
9 Nov 2011, 9:26 PM
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?

Jamie Avins
18 Nov 2011, 10:26 AM
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.