View Full Version : Combox with Multiselect + typeAhead not working at time

24 Mar 2012, 12:51 AM
Hi All,

I have combox with typeAhead set to true, and multiselect set to true.

but i guess typeAhead is not working for the multiselect.

here is my code

Ext.create('Ext.form.ComboBox', {
multiSelect : true,
delimiter: ";",
allowBlank: true,
hideTrigger: true,
editable: true,
selectOnFocus: true,
typeAhead: true,
disabled: false,
width: 300,
store: [['-1','Type here'],['27','dealer user'],['32','Nithya Prakash'],['34','manju1 p'],['36','swati jadhav'],['38','Manish Agrawal'],['40','Testuser1 Australia'],['41','girija2 Das'],['139','vivek2 yagna']],value:'-1',
triggerAction: 'all',
listeners: {change: function( comboField, newValue, oldValue, eOpts ){selectUserCallBack(newValue);}}});

I want typeAhead help + multiselect
Can you please suggest what is missing here?

24 Mar 2012, 7:22 AM
What do you mean not working?

25 Mar 2012, 8:38 PM
as per my understandings typeAhead gives you help, while typing some word.

i.e. if something like given in the screenshot.

But it is not working for me when I marked multiSelect as true.

suppose in my store there are 10 words. out of that 5 starts with 'V' and 5 with 'Y'
And if I [First attempt] I types 'V' , i will get some help for letters starts with 'V',


then I choose 2 words from the list then it will something like
Now if i want to add another word which start's 'Y' , even if I type 'Y' nothing appear in the dropdown list.As shown in the image.
Ideally , if i type 'Y' then I should get some help [list of words starts with 'Y' letter]

This is not working.

Can you please suggest me what is wrong here OR what I have misunderstood here ?

26 Mar 2012, 6:19 AM
Please suggest what is wrong here.

26 Mar 2012, 9:29 AM
multiSelect and typing in values are not really compatible. In general there's no way for the field to know where one value ends and the next value starts. Personally I wouldn't advise using multiSelect unless you also set editable: false.

If you're using a debug version of the library it should be logging a warning. The following code is taken from ComboBox:

if (me.typeAhead && me.multiSelect) {
Ext.Error.raise('typeAhead and multiSelect are mutually exclusive options -- please remove one of them.');

You could probably customize ComboBox to support your specific case but that's down to you.

13 Sep 2012, 1:35 PM

(http://www.sencha.com/forum/showthread.php?146473-ExtJS-4-Combo-Box-autocomplete-issues)Latest netemp (http://www.sencha.com/forum/member.php?242054-netemp) solution helped me...