auto scroll to the bottom of container in sencha t

2019-09-09 10:36发布

I have a view that contains 2 parts: + Part 1: an ADD button + Part 2: a container LIST that has scroll attribute is auto.

When user clicks on button ADD, the system will add a container to container LIST. User can add as much as they want.

But my container LIST has limit height so I want to scroll to new container that added to container LIST when user clicks ADD button. Anyone help me. Thanks

2条回答
戒情不戒烟
2楼-- · 2019-09-09 10:46

I tried to use:

var scroller = pan.getScrollable().getScroller();
scroller.scrollToEnd(true);

But it's not working. Then I tried another way:

var scroller = pan.getScrollable().getScroller();
scroller.scrollTo(x,y,true);// y = 100000000000

It's work :)

查看更多
老娘就宠你
3楼-- · 2019-09-09 10:56
var scroller = myListObject.getScrollable().getScroller();
scroller.scrollToEnd();
查看更多
登录 后发表回答