2
votes

I have a ExtJS ComboBox that contains a bunch of options, but when one option is selected, all the other options vanish!

Here's a simple example: http://jsfiddle.net/6FUpX/24/ - select something from the dropdown, and then try to select something else.

Can someone tell me what is wrong with this?

1
Oops - found a duplicate, and confirmed that triggerAction of 'all' fixes the issue - this needs closingMatt Roberts

1 Answers

0
votes

You should use triggerAction: 'all' in combo. In your code you use it in store.

var combo = new Ext.form.ComboBox({
   store: new Ext.data.JsonStore({
    storeId: 'racksStore',
    fields: ['RackId', 'Fullname'],
    autoLoad: false,
    root: 'Racks',
                     //<-- remove from store
    data: rackJson
}),
displayField: 'Fullname',
valueField: 'RackId',
triggerAction: 'all',   //<--- Use here
emptyText: 'Select a name...',
width: 135,
editable: false,
mode: 'local'
});