PDA

View Full Version : [FIXED] Pull Refresh not working



FBNitro
4 May 2015, 12:19 PM
I'm having problems with the pull to refresh plugin. I can't get it working. So I thought I'd try a simple app using the sample code on the pull refresh documentation page...
http://docs.sencha.com/extjs/6.0/6.0.0-modern/#!/api/Ext.plugin.PullRefresh



var store = Ext.create('Ext.data.Store', {
fields: ['name', 'img', 'text'],
data: [
{
name: 'rdougan',
img: 'http://a0.twimg.com/profile_images/1261180556/171265_10150129602722922_727937921_7778997_8387690_o_reasonably_small.jpg',
text: 'JavaScript development'
}
]
});

Ext.create('Ext.dataview.List', {
fullscreen: true,

store: store,

plugins: [
{
xclass: 'Ext.plugin.PullRefresh',
pullText: 'Pull down for more new Tweets!'
}
],

itemTpl: [
'<img src="{img}" alt="{name} photo" />',
'<div class="tweet"><b>{name}:</b> {text}</div>'
]
});

Drop this into an Ext6 modern app, and the app will error in the console, on the following code in Ext.plugin.PullRefresh:

// @private
initScrollable: function() {
var me = this,
list = me.getList(),
scroller = list.getScrollable(),
scroller;
if (!scroller) {
return;
}
scroller.setAutoRefresh(this.getScrollerAutoRefresh());

^^^

Uncaught TypeError: Object [object Object] has no method 'setAutoRefresh'

mitchellsimoens
4 May 2015, 12:25 PM
Thanks for the report! I have opened a bug in our bug tracker.