-
6 Nov 2011 2:23 PM #1
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.
-
7 Nov 2011 8:33 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,651
- Vote Rating
- 14
Thank you for the report.
-
7 Nov 2011 8:53 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,651
- Vote Rating
- 14
How are you loading the next page of results?
-
7 Nov 2011 10:44 AM #4
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?
-
9 Nov 2011 9:26 PM #5
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?
-
18 Nov 2011 10:26 AM #6Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,651
- Vote Rating
- 14
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.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-989
in
2.0.


Reply With Quote