[英]Infinite list with Sencha Touch 2.3
I'm developping a chat interface and trying to obtain the infinite list effect with Sencha Touch list component. 我正在开发一个聊天界面并尝试使用Sencha Touch列表组件获得无限列表效果。 I want to dynamically load older messages when the user scrolls up.
我想在用户向上滚动时动态加载旧消息。
myList.getStore().insert(0,itemsArray);
The problem : When I insert new items at the top of the list it automatically scrolls to the top. 问题:当我在列表顶部插入新项目时,它会自动滚动到顶部。 Is there a way to avoid it ?
有没有办法避免它?
This should be fixed by setting the list's scrollToTopOnRefresh
config option to false
这应该通过将列表的
scrollToTopOnRefresh
配置选项设置为false
来修复
see http://docs-origin.sencha.com/touch/2.3.1/#!/api/Ext.dataview.List-cfg-scrollToTopOnRefresh 见http://docs-origin.sencha.com/touch/2.3.1/#!/api/Ext.dataview.List-cfg-scrollToTopOnRefresh
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.