作为Ext.FormPanel使用 ExtJs 的一部分,您如何实现多选组合框?我一直在寻找,但似乎找不到与最新版本的 ExtJs 兼容的解决方案(这个问题类似,但没有工作/当前解决方案)。
这是我到目前为止所拥有的,但它是一个单一的选择:
new Ext.FormPanel({
labelAlign: 'top',
frame: true,
width: 800,
items: [{
layout: 'column',
items:[{
columnWidth: 1,
layout: 'form',
items: [{
xtype: 'combo',
fieldLabel: 'Countries',
name: 'c[]',
anchor: '95%',
allowBlank: false,
typeAhead: true,
triggerAction: 'all',
lazyRender: true,
mode: 'local',
store: new Ext.data.ArrayStore({
id: 0,
fields: ['myId', 'displayText'],
data: [
["CA", 'Canada'],
["US", 'United States'],
["JP", 'Japan'],
]
}),
valueField: 'myId',
displayField: 'displayText'
}]
}]
}]
}).render(document.body);