View Full Version : [CLOSED] combo autoSelect doesn't work with ArrayStore

25 May 2010, 2:59 PM
Version 3.2.0

How to reproduce:

modify the combos.js in the example/form/ directory and add autoSelect : true in the config.


the first entry in the state dropdown doesn't get selected, as opposed to what the documentation said.

I briefly diagnose this by setting breakpoints.

It seems that combo is listening to the 'load' event in the store, and the autoselect is handled in this onload handler.

However, for array store, the store is already loaded when you construct it, so the 'load' event is already fired by the time you bind it to the combo box.

Hope this helps.

13 Dec 2010, 8:21 AM
Don't quote me on this but from what I'm seeing, even a Json store combo has this problem. You define your store and later on your combo for that store. This means if the combo is listening for the load event and the store is set to auto load, the combo may be too late to pick up the load event.

14 Dec 2010, 2:16 AM
Correct, autoSelect:true doesn't work for preloaded stores, because the value is selected in the doLoad event handler.

For preloaded stores I suggest configuring the 'value' of the combobox with the first entry in the store.