修复EXTJS 4.0.2a下面gridFilter的type为list时,不能从服务器读取列表数据的bug

找到 Ext.ux.grid.menu.ListMenu 类,位于 extjs/examples/us/grid/menu/listmenu.js。

修改show方法为:

show: function () {
    var lastArgs = null;
    return function () {
        if (this.loadOnShow && !this.loaded) {
            this.store.load();
            this.callParent(lastArgs);
        } else {
            this.callParent(lastArgs);
        }
    };
} (), 

或使用Ext.override方法在其它文件进行修正。推荐使用override方法。

修改后,使用正常。

var listProvince = Ext.create("SMS.store.Selected.Province");
var filgerColumns = [
	{ dataIndex: 'ID' },
	{ dataIndex: 'ProvinceID', type: 'list', store: listProvince, labelField: 'text' },
	{ dataIndex: 'Name' }
];

image

原文地址:https://www.cnblogs.com/leehom0123/p/2152005.html