View Full Version : Combo: auto select by first letter

Clever Cutter
28 Jan 2010, 5:13 AM
On normal HTML drop downs, a states combo for example, when you type the letter 'F' the list would jump to Florida. I have a number of ExtJS combos on a page and this behavior does not appear to work. Is there a setting I need to specify for it to work? Here is an example of one of my combos:

Combo_FormRMVCompOpts = Ext.extend(Ext.form.ComboBox, {
constructor: function(config) {
Ext.apply(this, {
store: new Ext.data.SimpleStore({
fields: ['opts'],
data : [
['Basement Finished'],
['Basement Unfinished'],
['Construction Quality'],
['Design Appeal'],
['Functional Utility'],
['Garage / Bays'],
['Heating / Cooling'],
['Market Conditions'],
['Pool Type / Spa'],
['Porch / Patio / Deck'],
['Seller Concessions'],
['Water Supply / Septic']
forceSelection: true,
triggerAction: 'all',
mode: 'local',

Combo_FormRMVCompOpts.superclass.constructor.apply(this, arguments);
Ext.reg('combormvcmpopts', Combo_FormRMVCompOpts);

Clever Cutter
28 Jan 2010, 6:09 AM
I got this working. I discovered that I need to make the field editable for this behavior to work. This along with forceSelection: true looks to be the solution.