EXTJS comboBox multiselect

In ExtJS 3.3.1, I tried to make comboBox for multiple selection, but it does not work.

Please, help.

var mArray = new Array("ALL", "AAA", "BBB"); var mCombo = new Ext.form.ComboBox({ id: 'ID', fieldLabel: 'ID', triggerAction: 'all', height: 100, width: 163, multiSelect: true, store: mArray }); Ext.getCmp('mCombo').setValue("ALL"); 
+7
source share
2 answers

There Ext.form.ComboBox no configuration option in Ext.form.ComboBox , for example multiSelect .
To get the desired functionality, you need to either develop a multi-second drop-down layout yourself, or use one of the existing alternatives, for example Ext.ux.form.CheckboxCombo , Ext.ux.form.SuperBoxSelect and Ext.ux.form.LovCombo .

+10
source
 return new Ext.form.ComboBox({ fieldLabel: fieldLabel, hiddenName: name, store: store , valueField:'value', displayField:'value', typeAhead: true, mode: 'local', triggerAction: 'all', emptyText:'Select '+fieldLabel+' ...', selectOnFocus:true, allowBlank:allowBlank, forceSelection : true, disabled:disabled, multiSelect:true, width:200, id:id, listeners:{ change : function( frm, newValue, oldValue ) { doRenderTL(); } }, renderTo: Ext.get( renderTo ) }); 
-1
source

Source: https://habr.com/ru/post/919147/


All Articles