我有一个带有自定义渲染器的网格,见下文
{ text: 'Last Name',
dataIndex:'LastName',
renderer: function(v, m, r) {
return r.getDemographic().get('LastName');
}
}
我希望能够在用户键入时过滤掉该属性,我有以下内容
{
fieldLabel: 'Last Name',
emptyText: 'Last Name',
listeners: {
change: function (field, newValue, oldValue, options) {
var grid = Ext.getCmp('Grid');
grid.store.clearFilter();
grid.store.filter([
{ property: "Demographic.LastName", value: newValue }
]);
}
}
}
问题是,属性不是它的样子,我无法找到我需要绑定到的属性是什么。型号如下
Ext.define('Test', {
extend: 'Ext.data.Model',
fields: [
'id'
],
{ type: 'hasOne', model: 'Demographic', associationKey: 'Demographic', getterName: 'getDemographic' }]
});