【发布时间】:2016-09-02 15:54:31
【问题描述】:
在构建 GridPanel 的列值时,如果该字段没有值,我需要查找该字段,它应该查找另一个字段并将其呈现为列值。现在根据ExtJS6 docs,我们可以将单个数据属性传递给dataIndex,并通过渲染函数塑造值。但是没有提到如果提到的字段没有值,如何使用回退属性。
这里是sn-p:
{
text: 'Title',
flex: 1,
dataIndex: '<how-to-pass-object-itself-or-two-fields>',
renderer: function(value, metaData) {
return '<i class="fa fa-bars"></i>' + value;
}
}
【问题讨论】:
标签: javascript extjs extjs6