PDA

View Full Version : BuffererRenderer bug?



miroperez
18 Oct 2013, 9:44 AM
Shouldn't I be able to do this so an extension always uses a buffererRenderer solution:




Ext.define('Ext.grid.Panel2', {
extend: 'Ext.grid.Panel',

initComponent: function(){
this.plugins = [{
ptype: 'bufferedrenderer',
trailingBufferZone: 5, // Keep 20 rows rendered in the table behind scroll
leadingBufferZone: 5 // Keep 50 rows rendered in the table ahead of scroll
}];
this.callParent();
}
});
....

Ext.create('Ext.grid.Panel2', { store: someStoreHere});


The only way I can currently get this to work is to either directly pass the plugin in the config on the creation of the component or do this:




Ext.define('Ext.grid.Panel2', {
extend: 'Ext.grid.Panel',

initComponent: function(){
this.initialConfig.plugins = [{
ptype: 'bufferedrenderer',
trailingBufferZone: 5, // Keep 20 rows rendered in the table behind scroll
leadingBufferZone: 5 // Keep 50 rows rendered in the table ahead of scroll
}];
this.callParent();
}
});



It seems like you should be able to preconfigure the plugins for a specialized component but if you do the first bit of code you get js errors regarding defining 'on'

slemmon
25 Oct 2013, 9:27 PM
I'm not getting an error when I try and create a test case. Perhaps I'm missing something in what I've put together?

17g

miroperez
13 Nov 2013, 7:32 PM
what you have looks pretty much like what I had. he only thing I can think of thats different is I was using dynamic class loading. I'll have to set that up again to verify.