View Full Version : ComboBox altering are the selected item when user click somewhere in the browser.

Hans Kejser Hansen
8 Jun 2011, 3:04 AM
I'm have a combobox, where some of of the item's have the same text. When the user choose an "same text"-item and the click somewhere else, then the first item with the text be choosed.

I can't do anything about the texts, because they're based om user input and are allowed to be the same.

Example code:

var data =
[1, 'A1'],
[2, 'A2'],
[3, 'A3'],
[4, 'A4'],
[5, 'A4'],
[6, 'A4'],
[7, 'A5'],
[8, 'A6'],
[9, 'A7']

var store = new Ext.data.SimpleStore
fields:['aid', 'aname'],
data :data

var comboBox = new Ext.form.ComboBox
mode :'local',
hiddenName :'aid',
valueField :'aid',
displayField :'aname',
store :store


// Changes value after click outside the combobox.
setInterval(function() { console.log(+comboBox.getValue()); }, 500);

Hope anyone have a solution for this.


8 Jun 2011, 5:16 AM

Hans Kejser Hansen
9 Jun 2011, 5:27 AM
Thank for Your reply jarlau. Sorry i didn't found it, when i looked after a solutioin.