Reputation: 18980
The combo box is pulling up results (expanding) and focusing on the combo box in a form when my application starts. How can I prevent automatic focus and expansion on this combo box when the application starts? Note, I've tried setting the config "selectOnFocus" to true an false, and that didn't do anything.
width: 540,
labelAlign: 'right',
xtype: 'combo',
fieldLabel: 'Table',
emptyText: 'keyword search by table name...',
store: tableStore,
valueField: 'id',
displayField: 'value',
mode: 'remote',
name: 'table',
autoSelect: false,
selectOnFocus: true,
//shadow:true,
//forceSelection: true,
//triggerAction: 'all',
hideTrigger: true,
//multiSelect:true,
//typeAhead: true,
//minChars: 1,
listeners: {
change: function (obj, newValue, oldValue, eOpts) {
tableStore.proxy.extraParams.keyword = newValue;
tableStore.load();
this.expand();
}
} // listeners
Upvotes: 1
Views: 2225
Reputation: 15673
The issue is that your 'change' listener is triggered on form load.
Do you need this.expand() call at all?
Upvotes: 1