ExtJs combobox模糊匹配

下拉列表模糊查询(重要代码):

listeners : {
    beforequery : function(e) {  
        var combo = e.combo;     
        if(!e.forceAll){     
            var value = e.query;     
            combo.store.filterBy(function(record, id){     
                var text = record.get(combo.displayField);     
                return (text.indexOf(value)!=-1);     
            });  
            combo.expand();     
            return false;     
        }  
    }  
},

转载自:http://yan578351314.iteye.com/blog/1562829

posted @ 2016-08-22 17:31  一世尘梦(Aion)  阅读(2742)  评论(0编辑  收藏  举报