在使用过滤插件时,我遇到了一个集会网格列渲染没有被调用的问题。
首次进入页面时,它工作正常,甚至过滤。但是,如果我进行页面刷新(浏览器 F5 或转到另一个页面并返回),则不会调用渲染器函数。
这是错误还是功能?
我可以强制以某种方式调用渲染器函数,例如在商店加载事件中吗?
这是一个显示行为的小例子;
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function () {
Ext.create('Rally.data.wsapi.TreeStoreBuilder').build({
models: ['PortfolioItem/Initiative'],
enableHierarchy: true
}).then({
success: this._onStoreBuilt,
scope: this
});
},
_onStoreBuilt: function (store) {
var modelNames = ['PortfolioItem/Initiative'];
var context = this.getContext();
this.add({
xtype: 'rallygridboard',
context: context,
modelNames: modelNames,
toggleState: 'grid',
plugins: [
'rallygridboardaddnew',
{
ptype: 'rallygridboardfieldpicker',
headerPosition: 'left',
modelNames: modelNames,
stateful: true,
stateId: context.getScopedStateId('grid-fields')
},
{
ptype: 'rallygridboardinlinefiltercontrol',
inlineFilterButtonConfig: {
stateful: true,
stateId: context.getScopedStateId('grid-filters'),
modelNames: modelNames,
inlineFilterPanelConfig: {
quickFilterPanelConfig: {
defaultFields: [
'ArtifactSearch',
'State'
]
}
}
}
}
],
gridConfig: {
store: store,
columnCfgs: [
'Name',
'State',
{
text: 'Refined',
dataIndex: 'RefinedEstimate',
renderer: function (value) {
console.log("RefinedEstimate:renderer");
return value + " EUR";
}
}
]
},
height: this.getHeight()
});
}
});