extjs:combobox typeahead不适用于querymode:remote

extjs:combobox typeahead不适用于querymode:remote,extjs,extjs4,extjs4.1,Extjs,Extjs4,Extjs4.1,我有一个extjs组合框,其queryMode设置为remote。 我还想要它的typeAhead功能。但在这种情况下,typeahead不起作用。 即使在组合框中键入一些文本,存储区也会重新加载到原始数据 这是我的密码: var queryStore = Ext.create('Ext.data.Store', { //autoLoad: true, model: 'UserQuery', proxy: { type: 'ajax', url: 'queryBuilder_ge

我有一个extjs组合框,其
queryMode
设置为
remote
。 我还想要它的
typeAhead
功能。但在这种情况下,typeahead不起作用。 即使在组合框中键入一些文本,存储区也会重新加载到原始数据

这是我的密码:

var queryStore = Ext.create('Ext.data.Store', {
//autoLoad: true,
model: 'UserQuery',
proxy: {
    type: 'ajax',
    url: 'queryBuilder_getQueryList',
    extraParams: {
        tableId: this.title
    },
    reader: {
        type: 'json'
    }
},
listeners: {
    load: function () {
        var combo = Ext.getCmp('cmbQueryList');
        var lst = this.last();
        if (lst)combo.setValue(lst.data);
    }
}

});


var queryCombo = new Ext.form.ComboBox({
    width: 200,
    id: 'cmbQueryList',
    store: queryStore,
    valueField: 'queryID',
    displayField: 'queryName',
    typeAhead: true,
    forceSelection: true,
    emptyText: 'Select Query...',
    queryMode: 'remote',
    triggerAction: 'query',
    selectOnFocus: true,
    allowBlank: false,
    editable: true
 });

请建议如何让typeAhead和querymode remote一起工作。

这段代码对我来说很有用。我想你的商店属性autoload是真的,所以当你选择组合框时,它会转到服务器并重新加载数据。请删除store auto load true的属性。然后它就开始工作了

new Ext.form.ComboBox({  

    fieldLabel:'Apps',
    displayField: 'name',
    valueField: 'id',
    typeAhead: true,
    listWidth : 345,
    store: myStore(),
    forceSelection: true,
    triggerAction: 'all',
    mode:'remote',
    maxLength: 50,
    editable: false,
    anchor : '90%',
    selectOnFocus:true

 }),

以下代码对我有效。我们必须将
模式
查询模式
指定为
本地

var queryCombo = new Ext.form.ComboBox({
    width: 200,
    id: 'cmbQueryList',
    store: queryStore,
    valueField: 'queryID',
    displayField: 'queryName',
    emptyText: 'Select Query...',
    queryMode: 'local',
    mode: 'local'
 });

我将store的autoLoad属性设置为false。还是没有变化。每次我在组合框中输入文本时,存储被重新加载,组合框被重置(输入的文本被清除)在原始问题中添加了我的存储Hi Darkknowtfan,你能解决这个问题吗?