Mul*_*tut 2 combobox extjs typeahead
我基本上想让一个组合框看起来像一个具有自动完成/预先输入功能的textBox.
我已经实现了几乎所有功能,但使用以下代码过滤了类型的结果:
var tboxReportaNombre = Ext.create('Ext.form.field.ComboBox', {
margin: '5 0 0 10',
store: reportersNamesStore,
displayField: 'vcReportaNombre',
valueField: 'vcReportaNombre',
hideTrigger: true,
typeAhead: true,
typeAheadDelay: 100,
minChars: 2,
mode: 'local'
});
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的商店:
var reportersNamesStore = Ext.create('Ext.data.Store', {
fields: ['vcReportaNombre'],
proxy: {
type: 'ajax',
url: '/SIMAC/Incidencia/GetReportersNames',
}
});
Run Code Online (Sandbox Code Playgroud)
它工作正常,但是当我开始输入时,我希望过滤下拉列表以匹配我的查询.现在它没有(如下图所示).

任何帮助将非常感激.谢谢!
我刚刚解决了它,我不得不将属性queryMode设置为local并将lastQuery设置为空字符串.
结束这段代码:
var tboxReportaNombre = Ext.create('Ext.form.field.ComboBox', {
margin: '5 0 0 10',
store: reportersNamesStore,
displayField: 'vcReportaNombre',
valueField: 'vcReportaNombre',
hideTrigger: true,
typeAhead: true,
typeAheadDelay: 100,
minChars: 2,
queryMode: 'local',
lastQuery: ''
});
Run Code Online (Sandbox Code Playgroud)
我认为Sencha应该在其textboxfield中实现Typeahead属性和方法.