Dec 11, 2014, 1:33 PM
[CLOSED] [#609] Ext.grid.feature.Summary bug
In your examples for the Ext.grid.feature.Summary feature , there's an alignment bug. If you take a look at your example (https://examples2.ext.net/#/GridPane...group_headers/), the summary row at the bottom is not taking into account the scroll bar width because you are adding instead of subtracting. Please take a look and let me know if a fix is available, thanks.
This row:
This row:
me.summaryBar.innerCt.setWidth(this.getFullWidth() + Ext.getScrollbarSize().width);
should be:me.summaryBar.innerCt.setWidth(this.getFullWidth() - Ext.getScrollbarSize().width);
Ext.define('Ext.grid.feature.Summary', {
extend: Ext.grid.feature.AbstractSummary ,
alias: 'feature.summary',
dock: undefined,
dockedSummaryCls: Ext.baseCSSPrefix + 'docked-summary',
panelBodyCls: Ext.baseCSSPrefix + 'summary-',
init: function(grid) {
var me = this,
view = me.view;
me.callParent(arguments);
if (me.dock) {
grid.headerCt.on({
afterlayout: me.onStoreUpdate,
scope: me
});
grid.on({
beforerender: function() {
var tableCls = [me.summaryTableCls];
if (view.columnLines) {
tableCls[tableCls.length] = view.ownerCt.colLinesCls;
}
me.summaryBar = grid.addDocked({
childEls: ['innerCt'],
renderTpl: [
'<div id="{id}-innerCt">',
'<table cellPadding="0" cellSpacing="0" class="' + tableCls.join(' ') + '">',
'<tr class="' + me.summaryRowCls + '"></tr>',
'</table>',
'</div>'
],
style: 'overflow:hidden',
itemId: 'summaryBar',
cls: [ me.dockedSummaryCls, me.dockedSummaryCls + '-' + me.dock ],
xtype: 'component',
dock: me.dock,
weight: 10000000
})[0];
},
afterrender: function() {
grid.body.addCls(me.panelBodyCls + me.dock);
view.mon(view.el, {
scroll: me.onViewScroll,
scope: me
});
me.onStoreUpdate();
},
single: true
});
grid.headerCt.afterComponentLayout = Ext.Function.createSequence(grid.headerCt.afterComponentLayout, function() {
me.summaryBar.innerCt.setWidth(this.getFullWidth() + Ext.getScrollbarSize().width);
});
} else {
me.view.addFooterFn(me.renderTFoot);
}
grid.on({
columnmove: me.onStoreUpdate,
scope: me
});
view.mon(view.store, {
update: me.onStoreUpdate,
datachanged: me.onStoreUpdate,
scope: me
});
}
});
Last edited by Daniil; Dec 13, 2014 at 8:29 PM.
Reason: [CLOSED]