I am using extjs combobox for a sex field. It have two value "M" and "F". I want to make it usable with keyboard:
{
xtype: 'combo',
typeAhead: true,
queryMode: 'local',
minChars: 1,
triggerAction: 'all',
store: [
['M', 'M'],
['F', 'F']
]
}
This works if I type "Ftab" (uppercase), but not "ftab" (lowercase). If I check the code to this, the typeahead works:
store: [
['M', 'Male'],
['F', 'Female']
]
Any ways to keep the value as "M" and have lowercase works?
not sure if you figured this one out, but I had a similar problem and found the solution:
enableKeyEvents : true,
forceSelection : true,
typeAhead : false,
listeners :
{
'keyup' : function(me)
{
var val = me.getRawValue();
if(val == 'm' || val == 'f')
me.setValue(val.toUpperCase());
}
}
I also had a grid that was giving me grief for a simple yes/no type selection in a combobox. I have searched high and low for an answer, but came up with this hack.
Hope it helps!
Set the combobox 'caseSensitive' config attribute to false (caseSensitive : false). This should solve problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With