Combobox 在组合框don';不允许我选择项目(项目在html上没有内部ID)

Combobox 在组合框don';不允许我选择项目(项目在html上没有内部ID),combobox,Combobox,我不明白为什么使用Xtemplate组合框中的项目不再可选。我可以在html代码中看到这些项没有更多的内部ID。这是我的代码: Ext.define('app.widget.search.PredictiveInput', { extend: 'Ext.form.field.ComboBox', alias: 'widget.predictiveinput', store: 'SearchSyntax', storeCriteriaSyntax: 'SearchPredictiveInput'

我不明白为什么使用Xtemplate组合框中的项目不再可选。我可以在html代码中看到这些项没有更多的内部ID。这是我的代码:

Ext.define('app.widget.search.PredictiveInput', {
extend: 'Ext.form.field.ComboBox',
alias: 'widget.predictiveinput',

store: 'SearchSyntax',
storeCriteriaSyntax: 'SearchPredictiveInput',
nodeField: 'is_node',
leafField: 'is_leaf',
lastLeafField: 'is_last_leaf',
levelField: 'level',
triggerAction: 'all',
flex: 1,
queryMode: 'local',
displayField: 'subject_display',
valueField: 'id',
pageSize: 10,

setCustomTpl: function() {
var me = this;
me.tpl = Ext.create('Ext.XTemplate',
'<tpl for=".">',
' <div class="x-combo-list-item-isNode-{nodeField}' + 
' x-combo-list-item-isLeaf-{leafField}' + 
' x-combo-list-item-isLastLeaf-{lastLeafField}' +
' x-combo-list-item-level-{levelField}" role="option">{displayField</div>', 
'</tpl>'           
);
},

initComponent: function() {
this.callParent();
this.setCustomTpl();
}
});
Ext.define('app.widget.search.PredictiveInput'{
扩展:“Ext.form.field.ComboBox”,
别名:“widget.predictiveinput”,
存储:“SearchSyntax”,
storeCriteriaSyntax:“SearchPredictiveInput”,
nodeField:'是节点',
leafField:“is_leaf”,
lastLeafField:“是最后一片叶子吗?”,
levelField:'级别',
触发动作:“全部”,
弹性:1,
queryMode:'本地',
显示字段:“主题显示”,
valueField:'id',
页面大小:10,
setCustomTpl:函数(){
var me=这个;
me.tpl=Ext.create('Ext.XTemplate',
'',
“{displayField”,
''           
);
},
initComponent:function(){
这是callParent();
这是setCustomTpl();
}
});

我认为您必须添加类
x-boundlist-item

//下拉菜单的模板。
//注意“x-boundlist-item”类的使用,
//这是使项目可选所必需的。
tpl:Ext.create('Ext.XTemplate',
'',
“{abbr}-{name}”,
''
),
// Template for the dropdown menu.
// Note the use of "x-boundlist-item" class,
// this is required to make the items selectable.
tpl: Ext.create('Ext.XTemplate',
    '<tpl for=".">',
        '<div class="x-boundlist-item">{abbr} - {name}</div>',
        '</tpl>'
    ),