PDA

View Full Version : [FIXED] Bufferedrenderer grid dont update headers sort state extjs 4.2.4, 4.2.5



olimp
13 Jan 2016, 5:20 AM
Found a bug in extjs 4.2.4, 4.2.5.

Header Container don't updated when change sort on grid with buffered renderer.

Example:


Ext.application({
name : 'Fiddle',

launch : function() {
Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email', 'phone'],
data:{'items':[
{ 'name': 'Lisa', "email":"[email protected]", "phone":"555-111-1224" },
{ 'name': 'Bart', "email":"[email protected]", "phone":"555-222-1234" },
{ 'name': 'Homer', "email":"[email protected]", "phone":"555-222-1244" },
{ 'name': 'Marge', "email":"[email protected]", "phone":"555-222-1254" }
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});

Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
plugins: [{ptype: "bufferedrenderer"}],
columns: [
{ text: 'Name', dataIndex: 'name' },
{ text: 'Email', dataIndex: 'email', flex: 1 },
{ text: 'Phone', dataIndex: 'phone' }
],
height: 200,
width: 400,
renderTo: Ext.getBody()
});
}
});

Solution:


Ext.define("Ext.view.overrideAbstractView", {
override: "Ext.view.AbstractView",

refreshView: function() {
var me = this,
blocked = me.blockRefresh || !me.rendered || me.up('[collapsed],[isCollapsingOrExpanding],[hidden]');

if (blocked) {
me.refreshNeeded = true;
me.deferInitialRefresh = false;
} else {
if (me.bufferedRenderer && me.all.getCount()) {
me.bufferedRenderer.refreshView();
me.headerCt.setSortState(); // <-- ADD
} else {
me.refresh();
}
}
}



P.S. Forum message editor don't work under chrome. I don't know where this bug must be described.

Gary Schlosberg
21 Jan 2016, 4:50 PM
Thanks for the report! I have opened a bug in our bug tracker.

Gary Schlosberg
21 Jan 2016, 4:53 PM
Regarding the forum, I haven't experienced a problem using Chrome with the forum. What kind of issue did you experience?